[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Table functions in Lua 5.2 Reference Manual
- From: Alexander Gladysh <agladysh@...>
- Date: Tue, 26 Apr 2011 17:06:48 +0400
On Tue, Apr 26, 2011 at 17:02, 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
Ouch!
return {n = select('#',...), ...}
Alexander.