Promotic
WikipediaLinkedInYoutubeTwitterFacebook

TypeName - function of language VBScript

Description:
Returns a string that provides data type information about a variable.
Syntax:
TypeName(var As Variant) As String
Calling:
s = TypeName(var)
Parameters:
var(Variant) any variable
Return Values:
"Byte" - Byte value (1 byte)
"Integer" - Integer value (2 bytes)
"Long" - Long integer value (4 bytes)
"Single" - Single-precision floating-point value (4 bytes)
"Double" - Double-precision floating-point value (8 bytes)
"Date" - Date or time value
"String" - Character string value
"Boolean" - Boolean value; true or false
"Empty" - unitialized
"Null" - no valid data
"Object" - generic object
"Unknown" - Unknown object type
"Nothing" - object variable that doesn't yet refer to an object instance
Example:
Dim ArrayVar(4), sType
NullVar = Null
sType = TypeName("VBScript") ' Returns "String"
sType = TypeName(4) ' Returns "Integer"
sType = TypeName(37.50) ' Returns "Double"
sType = TypeName(NullVar) ' Returns "Null"
sType = TypeName(ArrayVar) ' Returns "Variant"
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice