From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4698 invoked from network); 25 May 2005 12:05:59 -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 12:05:59 -0000 Received: (qmail 80427 invoked from network); 25 May 2005 12:05:53 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 May 2005 12:05:53 -0000 Received: (qmail 25579 invoked by alias); 25 May 2005 12:05:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21274 Received: (qmail 25570 invoked from network); 25 May 2005 12:05:49 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 25 May 2005 12:05:49 -0000 Received: (qmail 80174 invoked from network); 25 May 2005 12:05:49 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 25 May 2005 12:05:44 -0000 Received: from exchange03.csr.com (unverified [10.100.137.60]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Wed, 25 May 2005 13:03:55 +0100 Received: from csr.com ([10.102.144.127]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 25 May 2005 13:07:26 +0100 To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: Shell variable tables:setting value for elemet 1 overwrites element 0 In-reply-to: References: Comments: In-reply-to wojciech.szenajch@bull.com.pl message dated "Wed, 25 May 2005 13:53:12 +0200." Date: Wed, 25 May 2005 13:05:43 +0100 Message-ID: <5033.1117022743@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 25 May 2005 12:07:26.0014 (UTC) FILETIME=[50ABB5E0:01C56122] 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 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 wonder why this zsh behaviour is kept, if all other popular shells number > arrays from 0. The array feature was originally based around csh rather than ksh. Accepting 0 as an alias for 1 dates from this time, I think. -- Peter Stephenson 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. **********************************************************************