Difference between revisions of "Type"
From GiderosMobile
Line 3: | Line 3: | ||
'''<translate>Available since</translate>:''' Gideros 2011.6<br/> | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> | ||
'''<translate>Class</translate>:''' [[Special:MyLanguage/(global)|(global)]]<br/> | '''<translate>Class</translate>:''' [[Special:MyLanguage/(global)|(global)]]<br/> | ||
+ | |||
=== <translate>Description</translate> === | === <translate>Description</translate> === | ||
<translate>Returns the type of its only argument, coded as a string. The possible results of this function are "nil" (a string, not the value nil), "number", "string", "boolean", "table", "function", "thread", and "userdata".</translate> | <translate>Returns the type of its only argument, coded as a string. The possible results of this function are "nil" (a string, not the value nil), "number", "string", "boolean", "table", "function", "thread", and "userdata".</translate> | ||
Line 8: | Line 9: | ||
(string) = type(v) | (string) = type(v) | ||
</source> | </source> | ||
+ | |||
=== <translate>Parameters</translate> === | === <translate>Parameters</translate> === | ||
'''v''': (any) <translate>value to get type from</translate> <br/> | '''v''': (any) <translate>value to get type from</translate> <br/> | ||
+ | |||
=== <translate>Return values</translate> === | === <translate>Return values</translate> === | ||
'''<translate>Returns</translate>''' (string) <translate>type of the variable</translate><br/> | '''<translate>Returns</translate>''' (string) <translate>type of the variable</translate><br/> | ||
+ | |||
+ | {{(global)}} |
Revision as of 04:31, 11 February 2020
Available since: Gideros 2011.6
Class: (global)
Description
Returns the type of its only argument, coded as a string. The possible results of this function are "nil" (a string, not the value nil), "number", "string", "boolean", "table", "function", "thread", and "userdata".
(string) = type(v)
Parameters
v: (any) value to get type from
Return values
Returns (string) type of the variable