lua-users home
lua-l archive

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


On 19/10/2010 07:23, Saptarshi Guha wrote:
Is there anyway to force chunks to create variable in the current context rather

Yes, declare them with 'local' attribute...

than in global when local is not specified?

Oups? Why not use local?
I know, you can forget it.
Well, this kind of question have been hashed and rehashed over the years, you can have hours of fun reading back the mailing list on the topic...
You have tricks to warn you of unwanted globals, though.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --