[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: _ENV vs _G
- From: Coda Highland <chighland@...>
- Date: Mon, 11 Aug 2014 13:50:39 -0700
On Mon, Aug 11, 2014 at 1:35 PM, Ashwin Hirschi <lua-l@reflexis.com> wrote:
>
>> This means you can write code like this in Lua:
>>
>> foo = 10
>> local _ENV = { foo=20 }
>> print(foo)
>
>
> You can write it, but it won't run... [since there's no more print! ;-)]
>
> Ashwin.
>
Oops, I forgot to store print in a local in my example. :P I
remembered loadstring!
/s/ Adam