From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27969 invoked from network); 16 May 2005 23:41:25 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 16 May 2005 23:41:25 -0000 Received: (qmail 43364 invoked from network); 16 May 2005 23:41:18 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 May 2005 23:41:18 -0000 Received: (qmail 18680 invoked by alias); 16 May 2005 23:41:11 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8836 Received: (qmail 18659 invoked from network); 16 May 2005 23:41:10 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 16 May 2005 23:41:10 -0000 Received: (qmail 42298 invoked from network); 16 May 2005 23:41:10 -0000 Received: from mail.gmx.net (213.165.64.20) by a.mx.sunsite.dk with SMTP; 16 May 2005 23:41:06 -0000 Received: (qmail invoked by alias); 16 May 2005 23:41:06 -0000 Received: from 217-68-190-208.cable.primacom.net (EHLO localhost) [217.68.190.208] by mail.gmx.net (mp001) with SMTP; 17 May 2005 01:41:06 +0200 X-Authenticated: #4912580 Date: Tue, 17 May 2005 01:39:22 +0200 From: Matthias Berndt To: Mike Hernandez Cc: zsh-users@sunsite.dk Subject: Re: Airthmetic confusion... Message-ID: <20050517013922.21a983fb@localhost> In-Reply-To: <3060c239050516135933fd2ff6@mail.gmail.com> References: <20050516.195529.74749456.Meino.Cramer@gmx.de> <20050516224332.246839a4@localhost> <3060c239050516135933fd2ff6@mail.gmail.com> X-Mailer: Sylpheed-Claws 1.0.4 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.4 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.4 On Mon, 16 May 2005 16:59:27 -0400 Mike Hernandez wrote: > Actually what happens is that the operation and assignment are > performed but the return code of the expression evaluates to 1, which > is an error. I tried on my machine and get the same results: > > (mike@mhernandez)(24/pts)(04:45pm:05/16/05)- > (%:~)- (( x = 0 )) > (mike@mhernandez)(25/pts)(04:46pm:05/16/05)- > (%:~)- echo $? > 1 > (mike@mhernandez)(26/pts)(04:46pm:05/16/05)- > (%:~)- echo $x > 0 I hope, I don't missunderstood ... the first posting, but 'echo $x' is '0'. So the value of 'x' is calculated correctly, but the returncode is false. > There must be a reason why assigning 0 to a variable is considered an > error (a reason which I could speculate about, but don't know for > sure). Are you sure there is a reason or isn't it probably a bug? Matthias Berndt