lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I did the following:

> print(_G)
table: 00C31B98
> print(_ENV)
table: 00C31B98
> print(_G._G)
table: 00C31B98
> print(_ENV._G)
table: 00C31B98
> print(_ENV._ENV)
nil
> print(_G._ENV)
nil

when I do print(_ENV) doesn't it access the variable _ENV._ENV? but printing _ENV._ENV is nil. So does it mean when I access any other variable aexcept _ENV it is accessed as _ENV.var?

  So this means that a running code cannot change its own environment as it could do in Lua 5.1.

Milind