lua-users home
lua-l archive

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


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.