lua-users home
lua-l archive

Re: passing vararg to xpcall?

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


On Feb 23, 2006, at 19:28, PA wrote:
Is there a way to get all the return values, including the ones after a nil?
Answering my own question:
function test()
 return 1, nil, 2, nil, 3
end
local someResults = { test() }
print( unpack( someResults, 1, table.maxn( someResults ) ) )
> 1 nil 2 nil 3
Cheers
--
PA, Onnay Equitursay
http://alt.textdrive.com/

AltStyle によって変換されたページ (->オリジナル) /