Difference between revisions of "Type"

From GiderosMobile
(remove language stuff)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
+
'''Class:''' [[(global)]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/(global)|(global)]]<br/>
 
  
=== <translate>Description</translate> ===
+
=== Description ===
<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>
+
Returns the type of its only argument, coded as a string.
 
<source lang="lua">
 
<source lang="lua">
 
(string) = type(v)
 
(string) = type(v)
 
</source>
 
</source>
  
=== <translate>Parameters</translate> ===
+
The possible results of this function are:
'''v''': (any) <translate>value to get type from</translate> <br/>
+
*'''"nil"''' (a string, not the value nil)
 +
*'''"number"'''
 +
*'''"string"'''
 +
*'''"boolean"'''
 +
*'''"table"'''
 +
*'''"function"'''
 +
*'''"thread"'''
 +
*'''"userdata"'''
  
=== <translate>Return values</translate> ===
+
=== Parameters ===
'''<translate>Returns</translate>''' (string) <translate>type of the variable</translate><br/>
+
'''v''': (any) value to get type from<br/>
 +
 
 +
=== Return values ===
 +
'''Returns''' (string) type of the variable<br/>
  
 
{{(global)}}
 
{{(global)}}

Revision as of 02:19, 25 January 2021

Available since: Gideros 2011.6
Class: (global)

Description

Returns the type of its only argument, coded as a string.

(string) = type(v)

The possible results of this function are:

  • "nil" (a string, not the value nil)
  • "number"
  • "string"
  • "boolean"
  • "table"
  • "function"
  • "thread"
  • "userdata"

Parameters

v: (any) value to get type from

Return values

Returns (string) type of the variable