[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Table functions in Lua 5.2 Reference Manual
- From: Peter Cawley <lua@...>
- Date: Tue, 26 Apr 2011 14:06:42 +0100
On Tue, Apr 26, 2011 at 2:02 PM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> On Tue, Apr 26, 2011 at 11:13 AM, Jakob Voss <jakob.voss@gbv.de> wrote:
>> t = table.pack(...)
>> t = {...}; t.n = #t
>
> Not quite. You were probably thinking of this:
>
> function pack(...)
> return {...,n = select('#',...)}
> end
Not quite. You were probably thinking of this:
function pack(...)
return {n = select('#',...),...}
end