TypeName
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 |
Currency | Currency value |
Date | Date value |
Double | Double-precision floating-point value |
Integer | Integer value |
Object | Generic object |
String | String value |
Array | 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''' <pre> 44 is a/an Integer 99.44 is a/an Double
Related Items
ISARRAY, ISDATE, ISEMPTY, isnull,ISNULL, ISNUMERIC, ISOBJECT, VARTYPE