[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: local and global
- From: Daniel Silverstone <dsilvers@...>
- Date: Wed, 15 Oct 2003 10:59:34 +0100
On Wed, 2003-10-15 at 04:22, Leandro Candido wrote:
> How can I access a global variable after a redeclaration as a local? Ex:
> [global x] = -x -- global x = negative of local x
If you *definitely* mean global rather than "local in enclosing scope"
then...
_G["x"] or just _G.x should do what you want (unless I'm horribly
mistaken)
D.
--
Daniel Silverstone http://www.digital-scurf.org/
Hostmaster, Webmaster, and Chief Code Wibbler: Digital-Scurf Unlimited
GPG Public key available from keyring.debian.org KeyId: 20687895