bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function definition syntax inconsistencies


From: Stephane Chazelas
Subject: Re: Function definition syntax inconsistencies
Date: Thu, 5 Jun 2008 10:47:32 +0100
User-agent: Mutt/1.5.16 (2007-09-19)

On Thu, Jun 05, 2008 at 10:07:51AM +0200, Andreas Schwab wrote:
> Stephane Chazelas <address@hidden> writes:
> 
> > I suspect this:
> > $ sh -c 'function() { echo a; }; function'
> > sh: -c: line 0: syntax error near unexpected token `('
> > sh: -c: line 0: `function() { echo a; }; function'
> >
> > breaks POSIX conformance, BTW (but then it's the same for AT&T
> > ksh, pdksh, zsh).
> 
> POSIX allows function to be treated as a reserved word, even if it does
> not attach any meaning to it.
[...]

You're right. Shame on me, I had said the exact same thing (that
POSIX allowed "function" to be a keyword) less than 1 week ago
in a bug report to posh
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=483860#20).

Looks like my skull is getting more and more porous...

Sorry about that.
St├ęphane




reply via email to

[Prev in Thread] Current Thread [Next in Thread]