TypeName: Difference between revisions
Jump to navigation
Jump to search
(Created page with "TYPENAME(''variable'') '''Description''' TYPENAME returns a string specifying the type of a variable. The required parameter, ''variable'', is any variable. '''Table 24: TY...") |
|||
(12 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
TypeName(''variable'') | |||
== Description == | |||
TypeName returns a string specifying the type of a variable. The required parameter, ''variable'', is any variable. | |||
'''Table 24: | '''Table 24: TypeName return values''' | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 28: | Line 28: | ||
|} | |} | ||
== Example (Basic) == | |||
<pre> | <pre> | ||
Rem TypeName Example | |||
' | 'TypeName returns variable type as a string | ||
Dim nInteger, nSingle | |||
nInteger = | nInteger = CInt(44) | ||
Print 44 & " is a/an " & TypeName(nInteger) | |||
nSingle = | nSingle = CSng(99.44) | ||
Print 99.44 & " is a/an " & TypeName(nSingle) | |||
</pre> | |||
== Output == | |||
<pre> | <pre> | ||
Line 46: | Line 47: | ||
</pre> | </pre> | ||
== Related Items == | |||
[[is (operator)|Is]], [[vartype|VarType]] | |||
[[Category:Language Reference]] | |||
[[Category:Variable Handling]] | |||
[[Category:Variable Handling]] | |||
[[ | [[Category:BASIC Functions]] |
Latest revision as of 15:38, 25 March 2019
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