Difference between revisions of "Setfenv"

From OpenEUO
Jump to: navigation, search
(Created page with " setfenv (f, table) Sets the environment to be used by the given function. f can be a Lua function or a number that specifies the function at that stack level: Level 1 is the fu...")
 
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
Sets the environment to be used by the given function. f can be a Lua function or a number that specifies the function at that stack level: Level 1 is the function calling setfenv. setfenv returns the given function.
 
Sets the environment to be used by the given function. f can be a Lua function or a number that specifies the function at that stack level: Level 1 is the function calling setfenv. setfenv returns the given function.
  
As a special case, when f is 0 setfenv changes the environment of the running thread. In this case, setfenv returns no values.
+
As a special case, when f is 0 setfenv changes the environment of the running thread. In this case, setfenv returns no values. <-- This case may not be applicable to openeuo.
 +
 
 +
[[Getfenv]]

Latest revision as of 10:06, 9 October 2010

setfenv (f, table)

Sets the environment to be used by the given function. f can be a Lua function or a number that specifies the function at that stack level: Level 1 is the function calling setfenv. setfenv returns the given function.

As a special case, when f is 0 setfenv changes the environment of the running thread. In this case, setfenv returns no values. <-- This case may not be applicable to openeuo.

Getfenv