lua-users home
lua-l archive

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


> function foo ()
>   return {6, "hello", {}, 32}
> end
> 
> Result = foo()
> NumValues = getn(Result)
> FirstValue = Result[1]
> LastValue = Result[NumValues]

Returning a table is fine, but if you insist in returning a list of values
instead of a table, use "unpack", introduced in 4.1 (alpha).
--lhf