[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: local and global
- From: "Leandro Candido" <enclle@...>
- Date: Wed, 15 Oct 2003 22:45:04 -0300
----- Original Message -----
From: "Nick Trout" <firstname.lastname@example.org>
To: "Lua list" <email@example.com>
Sent: Wednesday, October 15, 2003 9:41 PM
Subject: RE: local and global
I don't think you can do that anymore. In the old days you could use %x
to give you the "upvalue" of x, which was the outer scope value. I
believe upvalue syntax has been removed, which is probably a good thing.
You can't get the outer scope value in C/C++ when you have a clash, and
neither can you in Lua. Unless you use the debug interface (don't!) I
don't think you can get the value without nasty coding. Refactor your
algorithm or copy the value.
I remember of a discussion some times ago, in this list, about the use
of this, well... I now know the result :-). I can't use anymore :-(.