Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: 4.1: multi-parameter for loop
- X-seq: zsh-workers 15012
- From: Danek Duvall <duvall@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: PATCH: 4.1: multi-parameter for loop
- Date: Wed, 20 Jun 2001 15:56:22 -0700
- In-reply-to: <Tc0a88d015443e66af4@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>; from pws@xxxxxxx on Wed, Jun 20, 2001 at 08:12:09PM +0100
- Mail-followup-to: Danek Duvall <duvall@xxxxxxxxxxx>, zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <1010620185500.ZM9172@xxxxxxxxxxxxxxxxxxxxxxx> <Tc0a88d015443e66af4@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
On Wed, Jun 20, 2001 at 08:12:09PM +0100, Peter Stephenson wrote:
> "Bart Schaefer" wrote:
> > Well, there's this:
> >
> > for in in in in; do echo $in; done
>
> It will stop reading parameters when it reaches the second `in'. I meant
> to document this, although it should be pretty obvious.
Right. That lacks ambiguity because multiple distinct parameters can't
have the same name. But that ambiguity is missing in
for i in in in; do ....
Do you set $i to "in" and "in" or do you set $i and $in set to "in" and ""?
Posix presumably would simply use the first interpretation, and if you want
something like the second, just don't use a parameter named in? Or am I
missing the disambiguation?
Danek
Messages sorted by:
Reverse Date,
Date,
Thread,
Author