Zsh Mailing List Archive
Messages sorted by:
Re: Arithmetic expression and TRY_BLOCK_ERROR
- X-seq: zsh-users 9460
- From: DervishD <zsh@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Arithmetic expression and TRY_BLOCK_ERROR
- Date: Thu, 29 Sep 2005 12:30:03 +0200
- Cc: Zsh Users <zsh-users@xxxxxxxxxx>
- In-reply-to: <1050928145530.ZM24311@xxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: DervishD
- References: <20050927234153.GB988@DervishD> <4880307205092717115fbb352a@xxxxxxxxxxxxxx> <20050928084655.GC1384@DervishD> <1050928145530.ZM24311@xxxxxxxxxxxxxxxxxxxxxxx>
Hi Bart :)
* Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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...
Messages sorted by: