1. The assignment
typeset -a x=(a b c)
makes an indexed array x, but a subsequent
x=([0]=a [2]=b [5]=c)
turnes x into an associative array - against my declared will, and for no
obvious reason. On the other hand, the statement
typeset -a x=([0]=a [2]=b [5]=c)
creates an indexed array, though the right side has exactly the same form
as above. This looks inconsistent to me, and also causes problems when
assigning values to elements of a global array in a function. Example:
typeset -a x
function f
{ # ...
x=([0]=a [3]=b)
# ...
}
A call to f would make x associative, which I don't want. So I'm forced to use
f()
{ # ...
typeset -a x=([0]=a [3]=b)
# ...
}
But this makes all auxiliary variables in f global, which I don't want
either. A way out of this dilemma would be to change the behaviour of the
typeset-less assignment so that it leaves the 'indexed' attribute intact.
2. On my Linux box, the sequence
typeset -a x
typeset
causes the shell to crash with a memory fault. I'm using the 2007-11-05
version.
Regards,
Bernd
--
Bernd Eggink
[EMAIL PROTECTED]
http://sudrala.de
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers