Difference between revisions of "Getfenv"

From GiderosMobile
Line 3: Line 3:
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Class</translate>:''' [[Special:MyLanguage/(global)|(global)]]<br/>
 
'''<translate>Class</translate>:''' [[Special:MyLanguage/(global)|(global)]]<br/>
 +
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
 
<translate>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.</translate>
 
<translate>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.</translate>
Line 8: Line 9:
 
(table) = getfenv(f)
 
(table) = getfenv(f)
 
</source>
 
</source>
 +
 
=== <translate>Parameters</translate> ===
 
=== <translate>Parameters</translate> ===
 
'''f''': (varies) <translate>function or number(call stack level)</translate> '''optional'''<br/>
 
'''f''': (varies) <translate>function or number(call stack level)</translate> '''optional'''<br/>
 +
 
=== <translate>Return values</translate> ===
 
=== <translate>Return values</translate> ===
 
'''<translate>Returns</translate>''' (table) <translate>environment with all the defined values in environment scope</translate><br/>
 
'''<translate>Returns</translate>''' (table) <translate>environment with all the defined values in environment scope</translate><br/>
 +
 +
{{(global)}}

Revision as of 04:03, 11 February 2020


Available since: Gideros 2011.6
Class: (global)

Description

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.

(table) = getfenv(f)

Parameters

f: (varies) function or number(call stack level) optional

Return values

Returns (table) environment with all the defined values in environment scope