Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Short loops?
- X-seq: zsh-workers 2934
- From: <hzoli@xxxxxxxxxxxx> (Zoltan T. Hidvegi)
- To: pws@xxxxxx (Peter Stephenson)
- Subject: Re: Short loops?
- Date: Thu, 27 Feb 1997 10:06:03 -0500 (EST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <199702270932.KAA15453@xxxxxxxxxxxx> from Peter Stephenson at "Feb 27, 97 10:32:21 am"
Peter Stephenson wrote:
> while (( i++ < 10 )); { echo i is $i; } # Wrong!
I would add that
while (( i++ < 10 ))
{
echo i is $i
}
is also wrong, since newline behaves line a semicolon. And I would not
encourage the usage of this brace syntax in scrips because these syntax
rules are quite complicated. The old sh syntax do not have these hidden
traps. A lengthy discussion of this syntax in the FAQ may seem to
encourage the usage.
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author