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
> local  a, b, c, d = foo()
> Steve

Thank you, Steve. Unfortunately, this is not a variable number of return
values. I am searching for a way to return one time 1, another time 2, ...,
or even 100 values without a need to bother about the size of the

Some pseudo code:
Result = Foo()
NumValues = sizeof(Result)
FirstValue = Result[0]
LastValue = Result[NumValues-1]

Is something like this possible in LUA?