Skip to main content

type

type ( var : any ) : integer

ParameterTypeDescription
varanyVariable to be tested
ResultintegerData type number

Description

The type command returns a numeric value that indicates the type of variable you have passed in the var parameter.

Qodly provides the following predefined constants:

ConstantValue
kBlob30
kBoolean6
kCollection42
kDate4
kInteger9
kNull255
kObject38
kPicture3
kNumber1
kString2
kTime11
kUndefined5
kVariant12

You can apply the type function to variables and parameters of a method.

note

You cannot apply the type function to scalar expressions such as object properties (emp.name) or collection elements (myColl[5]). To do this, you must use the valueType command.