[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: setfenv(0,
- From: Wim Couwenberg <debosberg@...>
- Date: Fri, 12 Mar 2004 03:13:14 -0800 (PST)
> 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