[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Odd behaviour with multiple return values and varargs
- From: Rob Kendrick <lua-l@...>
- Date: Thu, 13 Sep 2007 12:48:18 +0100
David Kastrup wrote:
If you feel that the above should be allowed to behave unpredictable,
why should you ask me to change my code?
Just a minute - you're complaining that your code can't cope with
unexpected values being returned from the function? That's either your
or the function's fault, not the language's.
Anyway, there is no reasonably elegant way to rewrite something like
a, i = f(a+1,i), f(i,a)
without using temporary variables or other stuff.
function f(x) return x, 1, 2, 3 end
a, b = (f("a")), (f("b"))