lua-users home
lua-l archive

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

On Wed, Jan 4, 2012 at 11:06 PM,  <> wrote:
> Here's a demonstration:
> I'm wondering:
> is the above undocumented but intended behaviour? (it'd be pretty nasty to
> document)

What you are doing is actually defined in the manual. All of the
expressions are evaluated before the assignment [1]. Any side effects
of the evaluation will take effect before the assignment is performed.
In this case, local a is overwritten with nil and you get an indexing


- Patrick Donnelly