From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24556 invoked from network); 29 Sep 2005 10:29:55 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 29 Sep 2005 10:29:55 -0000 Received: (qmail 95473 invoked from network); 29 Sep 2005 10:29:49 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Sep 2005 10:29:49 -0000 Received: (qmail 8253 invoked by alias); 29 Sep 2005 10:29:42 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9460 Received: (qmail 8241 invoked from network); 29 Sep 2005 10:29:42 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 29 Sep 2005 10:29:42 -0000 Received: (qmail 94437 invoked from network); 29 Sep 2005 10:29:42 -0000 Received: from ns9.hostinglmi.net (213.194.149.146) by a.mx.sunsite.dk with SMTP; 29 Sep 2005 10:29:41 -0000 Received: from 212.red-80-35-44.staticip.rima-tde.net ([80.35.44.212] helo=localhost) by ns9.hostinglmi.net with esmtpa (Exim 4.52) id 1EKvfa-0006se-Ku; Thu, 29 Sep 2005 12:29:42 +0200 Date: Thu, 29 Sep 2005 12:30:03 +0200 From: DervishD To: Bart Schaefer Cc: Zsh Users Subject: Re: Arithmetic expression and TRY_BLOCK_ERROR Message-ID: <20050929103003.GA69@DervishD> Mail-Followup-To: Bart Schaefer , Zsh Users References: <20050927234153.GB988@DervishD> <4880307205092717115fbb352a@mail.gmail.com> <20050928084655.GC1384@DervishD> <1050928145530.ZM24311@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1050928145530.ZM24311@candle.brasslantern.com> User-Agent: Mutt/1.4.2.1i Organization: DervishD X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ns9.hostinglmi.net X-AntiAbuse: Original Domain - sunsite.dk X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - dervishd.net X-Source: X-Source-Args: X-Source-Dir: X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 Hi Bart :) * Bart Schaefer dixit: > On Sep 28, 10:46am, DervishD wrote: > } > } 'let variable=0' is shorter ;) I really don't know the reason, > } but I can find this kind of assignment everywhere :-/ > I suspect it's simply Peter's preference to always use variables in > a consistent context, i.e., either in math expressions or out, not > some of each. A possible reason for this is future-proofing. I understand, thanks for the explanation :) > Also, some people prefer the readability of being able to put spaces > around the "=". Me, for example. In fact, the entire ((...)) syntax is quite good when reading shource files, it really catches the eye. > However, doing integer/float assignments in math context is marginally > more efficient than doing them as plain assignments. In a single > command this is probably offset by the overhead of parsing the (( )), > but in a loop it could become important, and if you're in the habit of > always writing the (( )) you won't forget them where they matter. Thanks for both the explanation and the advice :) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 | http://www.dervishd.net http://www.pleyades.net & http://www.gotesdelluna.net It's my PC and I'll cry if I want to...