TypeName: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Brendon (talk | contribs)
No edit summary
Line 51: Line 51:


[[Category:Language Reference]]
[[Category:Language Reference]]
[[Category:Variable Handling]]

Revision as of 22:22, 13 September 2012

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

Is, VarType