Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Shell variable tables:setting value for elemet 1 overwrites element 0



Hi,

I did the following test for AIX 4.3.3/5.2 ksh, Linux: bash, and pdksh:

$ TB[0]=zero
$ TB[1]=one
$ echo ${TB[0]}
zero
$ echo ${TB[1]}
one


For zsh 4.2.0  (SuSE 9.1, Red Hat ES 4.0)
I did the following:

$ zsh --version
zsh 4.2.0 (i386-suse-linux)    or zsh 4.2.0 (i386-redhat-linux-gnu)
$ zsh
$ TB[0]=zero
$ echo ${TB[0]}
zero     <-------------------------------- correct result
$ TB[1]=one
$ echo ${TB[0]}
one     <-------------------------------- incorrect result
$ echo ${TB[1]}
one


Best Regards
Wojciech Szenajch




Messages sorted by: Reverse Date, Date, Thread, Author