Difference between revisions of "Debug.getupvalue"
From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === This function returns the name and the value of the upvalue with index up of the function func. The fu...") |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | '''Available since:''' Gideros 2011.6<br/> | + | <languages /> |
− | === Description === | + | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> |
− | 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>Class</translate>:''' [[Special:MyLanguage/debug|debug]]<br/> |
− | < | + | === <translate>Description</translate> === |
− | (string) (varies) | + | <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"> |
− | '''func | + | (string), (varies) = debug.getupvalue(func,up) |
− | '''up | + | </syntaxhighlight> |
− | '''Returns''' (string) the name of upvalue<br/> | + | === <translate>Parameters</translate> === |
− | '''Returns''' (varies) the value of upvalue<br/> | + | '''func''': (function) <translate>function to look for upvalue</translate> <br/> |
+ | '''up''': (number) <translate>index of the upvalue</translate> <br/> | ||
+ | === <translate>Return values</translate> === | ||
+ | '''<translate>Returns</translate>''' (string) <translate>the name of upvalue</translate><br/> | ||
+ | '''<translate>Returns</translate>''' (varies) <translate>the value of upvalue</translate><br/> | ||
+ | |||
+ | {{Debug}} |
Latest revision as of 14:27, 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.
(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