lua-users home
lua-l archive

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


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
>