[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lua-l
Subject:    Re: bug report: LUA compiler glitch
From:       Geoff Leyland <geoff_leyland () fastmail ! fm>
Date:       2011-08-09 22:39:41
Message-ID: 8AF6E12A-0C11-4F0C-9A3F-3798DB18CEEF () fastmail ! fm
[Download RAW message or body]

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?

Cheers,
Geoff


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic