lua-users home
lua-l archive

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


>From mcplin@hotmail.com Mon Dec 29 12:06:10 1997
>
>>$noglobals
>>z=10
>>q=45
>>g=54
>>
>>function example(x)
>>local w,y
>>global z,q
>>   w=x*x
>>   print(w+x+q)
>>   print(g)  -- error
>>end
>
>>From what I could understand from the manual, "print" is also a
>global variable, isn't it? How come you can access "print" without
>declaring it to be global? That looks weird...

excellent point! and one of the reasons why we don't want to change anything
right now. specially since lua already provides tools (metamechanisms!) for
handling this. (of course, such tools are available at run time only.)

we intend to post a longer message about this problem and solution soon.
--lhf