Difference between revisions of "Debug.getupvalue"

From GiderosMobile
Line 6: Line 6:
 
(string), (varies) = debug.getupvalue(func,up)
 
(string), (varies) = debug.getupvalue(func,up)
 
</source>
 
</source>
'''func''': (function) function to look for upvalue ''''''<br/>
+
=== Parameters ===
'''up''': (number) index of the upvalue ''''''<br/>
+
'''func''': (function) function to look for upvalue <br/>
 +
'''up''': (number) index of the upvalue <br/>
 +
=== Return values ===
 
'''Returns''' (string) the name of upvalue<br/>
 
'''Returns''' (string) the name of upvalue<br/>
 
'''Returns''' (varies) the value of upvalue<br/>
 
'''Returns''' (varies) the value of upvalue<br/>

Revision as of 10:45, 23 August 2018

Available since: Gideros 2011.6

Description

This function returns the name and the value of the upvalue with index up of the function func. The function returns nil if there is no upvalue with the given index.

(string), (varies) = debug.getupvalue(func,up)

Parameters

func: (function) function to look for upvalue
up: (number) index of the upvalue

Return values

Returns (string) the name of upvalue
Returns (varies) the value of upvalue