Click here to return to the KiXtart HelpDesk main page...

KiXtart 2001 Manual

VarType( )

Action: Returns an integer value indicating the subtype of a variable.
 
Syntax: VARTYPE ($variable)
 
Parameters: $Variable

Any type of variable.

Returns:
0 Empty
1 Null (no valid data)
2 Integer
3 Long integer
4 Single-precision floating-point number
5 Double-precision floating-point number
6 Currency
7 Date
8 String
9 Object Handle
10 Error
11 Boolean
12 Variant (used only with arrays of Variants)
13 A data-access object
17 Byte
8192 Array (can only occur in combination with one of the other values)
 
See Also: VarTypeName( )
 
Examples:

$MyVar = "AnyData"
? VarType( $MyVar ) ; will display "8" (String)

$MyArray = "a","b","c"
? VarType( $MyArray ) ; will display "8204" (Array of variants)
? VarType( $MyArray[0] ) ; will display "8" (String)