VARTYPEVARIANT FunctionWindows/Unix

A function that returns the data type of the current value stored in the variant.

Syntax: VARTYPE(variant)
DIM myvariant(100) AS VARIANT
myvariant(1) = "G"
VType = VARTYPE(myvariant(1))

Details:
Valid return values are:
0 - Number (includes Byte, Word, Dword, Short, Long/Integer)1 - Float (includes Single, Double)2 - StringExampledim TstNum as variantDEFDBL Number1Number1=77.0 TstNum=Number1VType = VARTYPE(TstNum)print "VType0=" ,VType  ' Return 0Number1=77.01 TstNum=Number1VType = VARTYPE(TstNum)print "VType1=" ,VType  ' Return 1
All undefined variants are initialized as Numbers.