Difference between revisions of "Debug.setupvalue"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === This function assigns the value value to the upvalue with index up of the function func. The function...")
 
Line 4: Line 4:
 
This function assigns the value value to the upvalue with index up of the function func. The function returns nil if there is no upvalue with the given index. Otherwise, it returns the name of the upvalue.
 
This function assigns the value value to the upvalue with index up of the function func. The function returns nil if there is no upvalue with the given index. Otherwise, it returns the name of the upvalue.
 
<source lang="lua">
 
<source lang="lua">
(string), = debug.setupvalue(funcupvalue,)
+
(string) = debug.setupvalue(func,up,value)
 
</source>
 
</source>
'''func:''' (function) function to set the upvalue for ''''''<br/>
+
'''func''': (function) function to set the upvalue for ''''''<br/>
'''up:''' (number) index of the upvalue ''''''<br/>
+
'''up''': (number) index of the upvalue ''''''<br/>
'''value:''' (varies) value to set as upvalue ''''''<br/>
+
'''value''': (varies) value to set as upvalue ''''''<br/>
 
'''Returns''' (string) name of the upvalue or nil<br/>
 
'''Returns''' (string) name of the upvalue or nil<br/>

Revision as of 11:16, 23 August 2018

Available since: Gideros 2011.6

Description

This function assigns the value value to the upvalue with index up of the function func. The function returns nil if there is no upvalue with the given index. Otherwise, it returns the name of the upvalue.

(string) = debug.setupvalue(func,up,value)

'func: (function) function to set the upvalue for '
'up: (number) index of the upvalue '
'value: (varies) value to set as upvalue '
Returns (string) name of the upvalue or nil