TYPENAME(variable)
Description
TYPENAME returns a string specifying the type of a variable. The required parameter, variable, is any variable.
Table 24: TYPENAME return values
|
Return value |
Description |
|
Boolean |
Boolean value |
|
Byte |
Byte value |
|
Currency |
Currency value |
|
Date |
Date value |
|
Decimal |
Decimal value |
|
Double |
Double-precision floating-point value |
|
Empty |
Uninitialized |
|
Error |
An error value |
|
Integer |
Integer value |
|
Long |
Long integer value |
|
Nothing |
Object variable that doesn't contain an object reference |
|
Null |
No valid value |
|
Object |
Generic object |
|
Oobjecttype |
An object of type objecttype |
|
Single |
Single-precision floating-point value |
|
String |
String value |
|
Unknown |
Unknown |
|
Variant() |
Array |
Example
REM TYPENAME Example
'TYPENAME returns variable type as a string
DIM nInteger, nSingle
nInteger = CINT(44)
PRINT 44 & " is a/an " & TYPENAME(nInteger)
nSingle = CSNG(99.44)
PRINT 99.44 & " is a/an " & TYPENAME(nSingle)
Output
44 is a/an Integer
99.44 is a/an Single
Related Items
ISARRAY, ISDATE, ISEMPTY, ISNULL, ISNUMERIC, ISOBJECT, VARTYPE