Promotic
WikipediaLinkedInYoutubeTwitterFacebook

VarType - function of language VBScript

Description:
Returns a value indicating the data type of a variable.
Syntax:
VarType(var As Variant) As Integer
Calling:
n = VarType(var)
Parameters:
var(Variant) Any variable
Return Values:
Returns the values of VBScript constants of data types.
Note:
This function never returns the value for Array data type by itself. It is always added to some other value to indicate an array of a particular type. The value for Variant data type is only returned when it has been added to the value for Array to indicate that the parameter var is an array. For example, the value returned for an array of Integer is calculated as 2 + 8192, or 8194. If an object has a default property, VarType (object) returns the type of its default property.
Example:
Dim n
n = VarType(300) ' Returns 2
n = VarType(#10/19/05#) ' Returns 7
n = VarType("VBScript") ' Returns 8
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice