Name
GetType -- examine a variable (V2.0)
Synopsis
type = GetType(var)
Function
This function can be used to find out the type of a variable or value. Possible return values are #NUMBER, #STRING, #TABLE, #FUNCTION, #USERDATA, #LIGHTUSERDATA, #THREAD and #NIL.

This function is often used to find out if a variable is Nil. Starting with Hollywood 6.0, however, there is also a new convenience function named IsNil() which can also be used to check variables against Nil.

See Data types for details.

Inputs
var
variable to examine
Example
type = GetType("Hello World")
This will return #STRING.


type = GetType({1, 2, 3, 4})
This will return #TABLE.


type = GetType(Function() DebugPrint("Hello") EndFunction)
This will return #FUNCTION.

Show TOC