Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Arithmetic expression and TRY_BLOCK_ERROR
- X-seq: zsh-users 9449
- From: John Reese <john.reese@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: Arithmetic expression and TRY_BLOCK_ERROR
- Date: Tue, 27 Sep 2005 17:11:28 -0700
- 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=
- In-reply-to: <20050927234153.GB988@DervishD>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20050927234153.GB988@DervishD>
- Reply-to: John Reese <john.reese@xxxxxxxxx>
2005/9/27, DervishD <zsh@xxxxxxxxxxxx>:
> Hi all :)
> I'll try to make it short ;) Why this:
> ...
> (( TRY_BLOCK_ERROR = 0 ))
> ...
> and not just this:
> ...
> TRY_BLOCK_ERROR=0
> ...
> ?????
>
The parentheses make it an integer variable. Also, that particular
assignment sets $? to 1. Maybe that's desired. I don't know.
Probably it's just that it's a fairly compact syntax for setting an
integer variable.
ofb:1% thok=0 17:08 ofb:~
ofb:1% (( khot = 0 )) 17:08 ofb:~
ofb:1% integer xox=0 17:08 <1> ofb:~
ofb:1% let box=0 17:08 ofb:~
ofb:1% typeset -p thok khot xox box 17:09 ofb:~
typeset thok=0
typeset -i khot=0
typeset -i xox=0
typeset -i box=0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author