lua-users home
lua-l archive

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

ahhhh... this makes perfect sense. thanks!


On Fri, 18 Feb 2005 22:01:37 -0200, Luiz Henrique de Figueiredo
<> wrote:
> > to my way of thinking "local a=b" and "local a; a=b"
> > should always be equivalent.
> Consider "local a=a". This would be useless in your interpretation but it's
> actually a nice idiom for copying global or outer variables to local variables.
> So, in "local a,b,c= A,B,C", the scope of a,b,c starts only after "C"
> not after "=".
> In other words, in the current interpretation you can implement what you want,
> but not vice-versa. So Lua opts for flexibility in this case.
> --lhf

Russ Smith