[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: SV: SV: pack/unpack
- From: Fredrik Widlund <fredrik.widlund@...>
- Date: Wed, 15 Jun 2011 17:04:24 +0200
Ok, but the below example can of course trivially be rewritten as
Whereas I can't rewrite around my problem...
Från: email@example.com [firstname.lastname@example.org] för Dirk Laurie [email@example.com]
Skickat: den 15 juni 2011 16:32
Till: Lua mailing list
Ämne: Re: SV: pack/unpack
On Wed, Jun 15, 2011 at 03:50:00PM +0200, Fredrik Widlund wrote:
> Ok, thank you! So in a list of expr a vararg is evaluated to the first
> element of the vararg unless last in the list.
> May I ask why this is?
Suppose f and g both return a variable number of values.
a,b,c = f(),g()
At present we know that a will get the first value from f,
b the first value from g, c the second value from g.
If the rule was not there, we would not know whether b will get
the second value from f or the first value from g, etc.