[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: unpack
- From: David Burgess <dburgess@...>
- Date: Wed, 27 Jul 2005 02:49:16 +1000
Thanks for the reminder. I should have remembered.
Methinks the behaviour is less than ideal.
DB
On 7/27/05, Aaron Brown <aaron-lua@oakadaptive.com> wrote:
> David Burgess wrote:
>
> > In work6 why does
> >
> > function out1(...)
> > stdout:write(unpack({...}), '\n')
> > end
>
> Same behavior as in Lua 5.0, modulo the "..." syntax:
>
> # If the function is called inside another expression or in
> # the middle of a list of expressions, then its return list
> # is adjusted to one element, thus discarding all returned
> # values except the first one. If the function is called as
> # the last element of a list of expressions, then no
> # adjustment is made (unless the call is enclosed in
> # parentheses).
>
> <http://www.lua.org/manual/5.0/manual.html#2.5.7>
>
> --
> Aaron
>