Type()

From Riftui Wiki

Jump to: navigation, search

Returns type of value. Possible types are: nil, boolean, number, string, table, function, userdata, thread. New types can't be defined.

Contents

Signature

type(value)

Parameters

value - value whose type we want to determine

Return value

type (string) - type of value

Examples

type("Hello world!"); -- returns "string"
 
type(true); -- returns "boolean"
 
type(nil); -- returns "nil"
 
type({}); -- return "table"
 
type(4.34); -- returns "number"
 
type(type); -- returns "function"
Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox