lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 10/08/2011, at 10:22 AM, Lars Doelle wrote:

> Hi All,
> please see the following example script.
> a,a = 1,2 -- 'a' is assigned 1 and not 2

I can't find anything in the LRM specifying the ordering of multiple assignments (I even checked online this time!), so I don't think you can have too many expectations about what that snippet does.  FWIW LuaJIT also sets a to 1.

Perhaps there should be a note in the LRM or PiL saying that the order is undefined?