Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Arithmetic expression and TRY_BLOCK_ERROR



    Hi John :)

 * John Reese <john.reese@xxxxxxxxx> dixit:
> 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.

    I know it, what I don't understand is why is it needed :? I mean,
that variable is already an integer variable.

>  Also, that particular
> assignment sets $? to 1.  Maybe that's desired.  I don't know. 

    Not in that context (is the code of the "throw" and "catch"
functions).

> Probably it's just that it's a fairly compact syntax for setting an
> integer variable.

    'let variable=0' is shorter ;) I really don't know the reason,
but I can find this kind of assignment everywhere :-/

    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...



Messages sorted by: Reverse Date, Date, Thread, Author