lua-users home
lua-l archive

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


David Kastrup wrote:
> Mike Pall <mikelu-1108@mike.de> writes:
> > 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)()

See Roberto's statement: "evaluation order is undefined"

I've left out a discussion of LHS evaluations to not complicate
the matter any further.

--Mike