Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Shell variable tables:setting value for elemet 1 overwrites element 0
- X-seq: zsh-workers 21273
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx, pws@xxxxxxx
- Subject: Re: Shell variable tables:setting value for elemet 1 overwrites element 0
- Date: Wed, 25 May 2005 12:40:04 +0100
- In-reply-to: <OF1494D356.1AD93BB5-ONC125700C.003A318B@xxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <OF1494D356.1AD93BB5-ONC125700C.003A318B@xxxxxxxxxxx>
wojciech.szenajch@xxxxxxxxxxx wrote:
> $ 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
This is correct. "setopt ksh_arrays" or start up under the alias sh
or ksh to get the other behaviour.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
Messages sorted by:
Reverse Date,
Date,
Thread,
Author