Difference between revisions of "Getfenv"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
=== Description ===
 
=== 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.
+
<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>
 
<source lang="lua">
 
<source lang="lua">
 
(table) = getfenv(f)
 
(table) = getfenv(f)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''f''': (varies) function or number(call stack level) '''optional'''<br/>
+
'''f''': (varies) <translate>function or number(call stack level)</translate> '''optional'''<br/>
 
=== Return values ===
 
=== Return values ===
'''Returns''' (table) environment with all the defined values in environment scope<br/>
+
'''Returns''' (table) <translate>environment with all the defined values in environment scope</translate><br/>

Revision as of 13:32, 23 August 2018

Available since: Gideros 2011.6

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