Difference between revisions of "Debug.getupvalue"
From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight") |
|||
Line 5: | Line 5: | ||
=== <translate>Description</translate> === | === <translate>Description</translate> === | ||
<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> | <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> | ||
− | < | + | <syntaxhighlight lang="lua"> |
(string), (varies) = debug.getupvalue(func,up) | (string), (varies) = debug.getupvalue(func,up) | ||
</source> | </source> |
Revision as of 14:26, 13 July 2023
Available since: Gideros 2011.6
Class: debug
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. <syntaxhighlight lang="lua"> (string), (varies) = debug.getupvalue(func,up) </source>
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