zsh-users
 help / color / mirror / code / Atom feed
From: DervishD <zsh@dervishd.net>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh Users <zsh-users@sunsite.dk>
Subject: Re: Arithmetic expression and TRY_BLOCK_ERROR
Date: Thu, 29 Sep 2005 12:30:03 +0200	[thread overview]
Message-ID: <20050929103003.GA69@DervishD> (raw)
In-Reply-To: <1050928145530.ZM24311@candle.brasslantern.com>

    Hi Bart :)

 * Bart Schaefer <schaefer@brasslantern.com> 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...


      reply	other threads:[~2005-09-29 10:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-27 23:41 DervishD
2005-09-28  0:11 ` John Reese
2005-09-28  0:48   ` Will Maier
2005-09-28  1:04     ` John Reese
2005-09-28  8:46   ` DervishD
2005-09-28 14:55     ` Bart Schaefer
2005-09-29 10:30       ` DervishD [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050929103003.GA69@DervishD \
    --to=zsh@dervishd.net \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).