Difference between revisions of "Getfenv"

From OpenEUO
Jump to: navigation, search
(Created page with " getfenv ([f]) Returns the current environment in use by the function. f can be a Lua function or a number that specifies the function at that stack level: Level 1 is the functio...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
  getfenv ([f])
 
  getfenv ([f])
 
Returns the current environment in use by the function. f can be a Lua function or a number that specifies the function at that stack level: Level 1 is the function calling getfenv. If the given function is not a Lua function, or if f is 0, getfenv returns the global environment. The default for f is 1.
 
Returns the current environment in use by the function. f can be a Lua function or a number that specifies the function at that stack level: Level 1 is the function calling getfenv. If the given function is not a Lua function, or if f is 0, getfenv returns the global environment. The default for f is 1.
 +
 +
[[Setfenv]]

Latest revision as of 10:06, 9 October 2010

getfenv ([f])

Returns the current environment in use by the function. f can be a Lua function or a number that specifies the function at that stack level: Level 1 is the function calling getfenv. If the given function is not a Lua function, or if f is 0, getfenv returns the global environment. The default for f is 1.

Setfenv