lua-users home
lua-l archive

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

>>I can't remember if this has been discussed before, but I would very 
>>much like an option (either in Lua or C) that changes the default
>>of variable declarations from global to local.
>"global in {}" does (almost) this.

I don't really understand this. Actually, maybe "global in nil" does
what I really want (no accidental globals). Can you provide more details
on the global keyword, and especially "in"? I'm wondering, for example,
whether it only affects variables that already exist vs variables
created later, etc.