On 06-Mar-00 Doug Barton wrote:
> I just checked POSIX 1003.2.
> 
> for name [ in word ] 
> do
>         compound-list
> done
> 
> the "in word" is optional. Therefore:
> 
> for name in ; do echo $name; done
> 
> is an error, whereas
> 
> for name ; do echo $name; done

These are two different functions.  The second one loops through the
command line parameters.

> is not, and Bash does not report it as so, in or out of POSIX mode.
> Also, your snippet clearly expects that there will be a word after "in."
> It could easily be argued from that context that the presence of "in"
> without a "word" to go with it is an error, even without the bit from
> Martin's post. 
> 
>       All that said, if the ports make system depends on the current
> behavior, it has to be fixed before we can contemplate any changes.

Patches accepted.

> Doug

-- 

John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to