Difference between revisions of "Debug.getupvalue"
From GiderosMobile
Line 2: | Line 2: | ||
'''Available since:''' Gideros 2011.6<br/> | '''Available since:''' Gideros 2011.6<br/> | ||
=== Description === | === 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. | + | <translate>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.</translate> |
<source lang="lua"> | <source lang="lua"> | ||
(string), (varies) = debug.getupvalue(func,up) | (string), (varies) = debug.getupvalue(func,up) | ||
</source> | </source> | ||
=== Parameters === | === Parameters === | ||
− | '''func''': (function) function to look for upvalue <br/> | + | '''func''': (function) <translate>function to look for upvalue</translate> <br/> |
− | '''up''': (number) index of the upvalue <br/> | + | '''up''': (number) <translate>index of the upvalue</translate> <br/> |
=== Return values === | === Return values === | ||
− | '''Returns''' (string) the name of upvalue<br/> | + | '''Returns''' (string) <translate>the name of upvalue</translate><br/> |
− | '''Returns''' (varies) the value of upvalue<br/> | + | '''Returns''' (varies) <translate>the value of upvalue</translate><br/> |
Revision as of 13:34, 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