lua-users home
lua-l archive

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


----- Original Message -----
> I'm just implementing some logic around local variables in jlua, and
> discovered
> that local variables can be declared in the global namescape in lua. Is
this
> by design or by coincidence?

Yes you can define a global variable inside a function. Variables without
'local' are automatic global :-)

/Erik