[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: bug report: LUA compiler glitch
- From: David Kastrup <dak@...>
- Date: Wed, 10 Aug 2011 01:52:56 +0200
Mike Pall <mikelu-1108@mike.de> writes:
> Ross Andrews wrote:
>> By "order of assignment is undefined", does it mean that the order in which
>> values are put in variables is undefined, or the order in which the
>> right-hand side is evaluated is undefined?
>
> Actually both. The parallel assignment statement only guarantees
> that all expressions on the right-hand side are evaluated *before*
> any of the assignments are made.
Well, what about left-hand evaluations?
i, a[i] = 1, 2
a[i] = (function () i = i+1 end)()
--
David Kastrup