TypeName: Difference between revisions
Jump to navigation
Jump to search
m Corrects capitalization on TypeName return values; values returned are in lowercase, not sentence case |
m →Output: Changes capitalization on return values; return values are in lowercase, not sentnece case |
||
Line 43: | Line 43: | ||
<pre> | <pre> | ||
44 is a/an | 44 is a/an integer | ||
99.44 is a/an | 99.44 is a/an double | ||
</pre> | </pre> | ||
Latest revision as of 02:55, 3 February 2025
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 (Basic)
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 double