[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Global access control
- From: lhf (Luiz Henrique de Figueiredo)
- Date: Mon, 29 Dec 1997 13:08:01 -0200
>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