[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How do you return multiple values?
- From: David Manura <dm.lua@...>
- Date: Wed, 4 Nov 2009 22:14:08 -0500
On Wed, Nov 4, 2009 at 3:45 PM, Geoff Leyland wrote:
>> function b()
>> local t = pack(pcall(a));
>> if not r[1] then error("something") end
>> return unpack(r, 2, r.n)
>> end
The above solutions and others are cataloged in
http://lua-users.org/wiki/VarargTheSecondClassCitizen (Vararg Saving).