From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19298 invoked from network); 28 Sep 2005 00:11:46 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 28 Sep 2005 00:11:46 -0000 Received: (qmail 78803 invoked from network); 28 Sep 2005 00:11:40 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 28 Sep 2005 00:11:40 -0000 Received: (qmail 23535 invoked by alias); 28 Sep 2005 00:11:31 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9449 Received: (qmail 23524 invoked from network); 28 Sep 2005 00:11:29 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 28 Sep 2005 00:11:29 -0000 Received: (qmail 77704 invoked from network); 28 Sep 2005 00:11:29 -0000 Received: from zproxy.gmail.com (64.233.162.198) by a.mx.sunsite.dk with SMTP; 28 Sep 2005 00:11:29 -0000 Received: by zproxy.gmail.com with SMTP id i11so343527nzi for ; Tue, 27 Sep 2005 17:11:28 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=T3xtFlI8fP8gVSaInly+akxjhXTmFE6xst4wyvcpVmS0tDrUd1Vld3bEt6ctwhTCbZpTTG8BngFwZl8/aotlwkVWDQgbihfVJc8GqBA4q86P0QhpNw1x82tXqOgv8VJKa5JpUDd/kjve0cYX/EsNz8ytWmKWGfdthu78DNJbRi0= Received: by 10.54.121.16 with SMTP id t16mr1291098wrc; Tue, 27 Sep 2005 17:11:28 -0700 (PDT) Received: by 10.54.121.7 with HTTP; Tue, 27 Sep 2005 17:11:28 -0700 (PDT) Message-ID: <4880307205092717115fbb352a@mail.gmail.com> Date: Tue, 27 Sep 2005 17:11:28 -0700 From: John Reese Reply-To: John Reese To: Zsh Users Subject: Re: Arithmetic expression and TRY_BLOCK_ERROR In-Reply-To: <20050927234153.GB988@DervishD> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050927234153.GB988@DervishD> 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.5 required=5.0 tests=BAYES_00,RCVD_BY_IP autolearn=ham version=3.0.4 2005/9/27, DervishD : > Hi all :) > I'll try to make it short ;) Why this: > ... > (( TRY_BLOCK_ERROR =3D 0 )) > ... > and not just this: > ... > TRY_BLOCK_ERROR=3D0 > ... > ????? > The parentheses make it an integer variable. Also, that particular assignment sets $? to 1. Maybe that's desired. I don't know.=20 Probably it's just that it's a fairly compact syntax for setting an integer variable. ofb:1% thok=3D0 17:08= ofb:~ ofb:1% (( khot =3D 0 )) 17:08= ofb:~ ofb:1% integer xox=3D0 17:08 <1>= ofb:~ ofb:1% let box=3D0 17:08= ofb:~ ofb:1% typeset -p thok khot xox box 17:09 o= fb:~ typeset thok=3D0 typeset -i khot=3D0 typeset -i xox=3D0 typeset -i box=3D0