From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19150 invoked from network); 25 May 2005 14:48:41 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 25 May 2005 14:48:41 -0000 Received: (qmail 95691 invoked from network); 25 May 2005 14:48:36 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 May 2005 14:48:36 -0000 Received: (qmail 20217 invoked by alias); 25 May 2005 14:48:33 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21276 Received: (qmail 20208 invoked from network); 25 May 2005 14:48:33 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 25 May 2005 14:48:33 -0000 Received: (qmail 95421 invoked from network); 25 May 2005 14:48:33 -0000 Received: from vms042pub.verizon.net (206.46.252.42) by a.mx.sunsite.dk with SMTP; 25 May 2005 14:48:28 -0000 Received: from candle.brasslantern.com ([4.11.1.68]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IH100HNOVSN62X6@vms042.mailsrvcs.net> for zsh-workers@sunsite.dk; Wed, 25 May 2005 09:48:24 -0500 (CDT) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j4PEmMob019386 for ; Wed, 25 May 2005 07:48:22 -0700 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j4PEmMmI019385 for zsh-workers@sunsite.dk; Wed, 25 May 2005 07:48:22 -0700 Date: Wed, 25 May 2005 14:48:22 +0000 From: Bart Schaefer Subject: Re: Shell variable tables:setting value for elemet 1 overwrites element 0 In-reply-to: <5033.1117022743@csr.com> To: zsh-workers@sunsite.dk (Zsh hackers list) Message-id: <1050525144822.ZM19384@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: <5033.1117022743@csr.com> Comments: In reply to Peter Stephenson "Re: Shell variable tables:setting value for elemet 1 overwrites element 0" (May 25, 1:05pm) X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On May 25, 1:05pm, Peter Stephenson wrote: } Subject: Re: Shell variable tables:setting value for elemet 1 overwrites e } } wojciech.szenajch@bull.com.pl 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.