lua-users home
lua-l archive

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


> Why following script prints nil?
> ---
> local env = {key = "test", next = next, pairs =
> pairs}
> setmetatable(env, {__index = _G})
> setfenv(0, env)
> print(key)
> ---

It prints "test" in my Lua 5.0 console...  Is this a
snippet of a larger script (with some local key)?

--
Wim


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you?re looking for faster
http://search.yahoo.com