API Documentation > CorelDRAW > 2025-v26 > CorelScriptTools > ICorelScriptTools
CorelScriptTools.GetType method
Gets Type
Syntax:
Function GetType(ByVal Expression As Variant) As Long
Parameters:
Name Type Description
Expression
Variant
Remarks:
The GetType method returns an expression's data type. In the case of variants, the data subtype is returned.
Examples:
In the following code example, A is assigned the value 2 because the variant Z data subtype is set to long.
x% = 66 'integer data type y# = 14 'long data type Z = x / y A = GETTYPE (x / y)
In the following code example, B is set to 4 because a whole number is treated as a long and C is set to 6 because a fractional number is treated as a double.
B = GETTYPE (3) C = GETTYPE (3.3)