On 12/16/14 5:10 PM, Stephane Chazelas wrote:
> bash-4.3$ a=([9223372036854775806]=1 2 3 4)
> bash-4.3$ echo "${!a[@]}"
> -9223372036854775808 -9223372036854775807 9223372036854775806 
> 9223372036854775807
> 
> That wraps but as signed longs, which means we get negative
> indexes which we can't easily use.

OK.  Array indices are arithmetic expressions.  From the man page:

"Evaluation  is done in fixed-width integers with no check for overflow"

They're not checked.
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to