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 21276
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: Shell variable tables:setting value for elemet 1 overwrites element 0
- Date: Wed, 25 May 2005 14:48:22 +0000
- In-reply-to: <5033.1117022743@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <OFB8636392.BEFDACE9-ONC125700C.00408215@xxxxxxxxxxx> <5033.1117022743@xxxxxxx>
On May 25, 1:05pm, Peter Stephenson wrote:
} Subject: Re: Shell variable tables:setting value for elemet 1 overwrites e
}
} wojciech.szenajch@xxxxxxxxxxx wrote:
} > If this is the case, then any operation performed on element 0 should
} > return error message. This is misleading that operations like
} > TB[0]=zero; echo ${TB[0]} are accepted.
}
} Yes, it was probably the wrong decision to accept [0] in this case.
} I hope no one's relying on it, but you can't be sure.
I don't think there's any reason to allow *assignment* to index zero,
except perhaps as a way to accomplish array=(newelement $array). The
dereference of $array[0] is a different matter.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author