lua-users home
lua-l archive

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


>so global doesn't affect dofile statements at all? 

No, neither does local. Change your example to "local a=123" and it'll print
nil twice.

>Really? Interesting. so i can't use global for sandboxes in which dofile 
>would be allowed?

I'm not sure what you mean here.

>The beauty in lua lies in the simplicity which still provides 
>uncomplicated and  powerful ways of doing things.
>This global statement somehow doesn't fit. it really looks like an 
>complex and complicated beast albeit the "simple" syntax.

You have a point. The syntax is simple but the semantics can get confusing.
The main issue is whether global declarations as proposed solve the
perceived need for global declarations.
--lhf