[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: local variables and scope
- From: Jamie Webb <j@...>
- Date: Fri, 26 Aug 2005 14:40:18 +0100
On Fri, Aug 26, 2005 at 10:06:27AM -0300, Roberto Ierusalimschy wrote:
> > So whenever I really want to have the ability to create a global var,
> > which is obviously not very often I use global.this="that"
>
> This is a nice solution. Its main problem is that programs written
> that way will not run without this module. That is, "sctrict" programs
> are not a subset of regular programs.
But assuming there's no funky setfenv stuff going on, one could stick
'local global = global or _G' at the top of each chunk and have it
work either way.
-- Jamie Webb