[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Odd behaviour with multiple return values and varargs
- From: David Kastrup <dak@...>
- Date: Wed, 12 Sep 2007 17:35:49 +0200
"Tom Miles" <Tom@creative-assembly.co.uk> writes:
> Okay, so I'm obviously missing something with this. Can anyone explain the
> behaviour from this:
>
> function test1()
> return 1, 2
> end
>
> function test2()
> return 3,4
> end
>
> print(test1(), test2())
>
>> 1 3 4
>
> I would have expected it to output 1 2 3 4. Why doesn't it?
Only the last function in a comma list has multiple return values
respected.
--
David Kastrup