[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Return a variable number of values from function
- From: "Matthias Gall" <matthias@...>
- Date: Sun, 18 Nov 2001 23:38:50 +0100
> 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
destination.
Some pseudo code:
Result = Foo()
NumValues = sizeof(Result)
FirstValue = Result[0]
LastValue = Result[NumValues-1]
Is something like this possible in LUA?
Greetings,
Matt