Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: anonymous functions (no documentation yet)



Stephane Chazelas wrote:
> On Thu, Jun 26, 2008 at 04:06:36PM +0100, Peter Stephenson wrote:
> > > Out of interest, how does it affect:
> > >   ""() { ... }
> > 
> > That also turns into an empty argument list that is ignored.  I would
> > have to check why since my first guess was it would produce an invalid
> > empty function name.
> 
> Well,
> 
> ""() echo test
> ''
> 
> Does echo "test".

You're right; I didn't try it out.  I'd forgotten functions (unlike
variables) could be called absolutely any string of characters.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author