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...")
 
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 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.
+
'''<translate>Class</translate>:''' [[Special:MyLanguage/debug|debug]]<br/>
<source lang="lua">
+
=== <translate>Description</translate> ===
(string), = debug.setupvalue(funcupvalue,)
+
<translate>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.</translate>
</source>
+
<syntaxhighlight lang="lua">
'''func:''' (function) function to set the upvalue for ''''''<br/>
+
(string) = debug.setupvalue(func,up,value)
'''up:''' (number) index of the upvalue ''''''<br/>
+
</syntaxhighlight>
'''value:''' (varies) value to set as upvalue ''''''<br/>
+
=== <translate>Parameters</translate> ===
'''Returns''' (string) name of the upvalue or nil<br/>
+
'''func''': (function) <translate>function to set the upvalue for</translate> <br/>
 +
'''up''': (number) <translate>index of the upvalue</translate> <br/>
 +
'''value''': (varies) <translate>value to set as upvalue</translate> <br/>
 +
=== <translate>Return values</translate> ===
 +
'''<translate>Returns</translate>''' (string) <translate>name of the upvalue or nil</translate><br/>
 +
 
 +
{{Debug}}

Latest revision as of 15:26, 13 July 2023


Available since: Gideros 2011.6
Class: debug

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)

Parameters

func: (function) function to set the upvalue for
up: (number) index of the upvalue
value: (varies) value to set as upvalue

Return values

Returns (string) name of the upvalue or nil