IBM Lotus Symphony


TypeName Function; VarType Function[Runtime]

Returns a string (TypeName) or a numeric value (VarType) that contains information for a variable.

Syntax:

TypeName (Variable)VarType (Variable)

Return value:

String; Integer

Parameters:

Variable: The variable that you want to determine the type of. You can use the following values:

Table 1. Variable values
key word VarType Variable type
Boolean 11 Boolean variable
Date 7 Date variable
Double 5 Double floating point variable
Integer 2 Integer variable
Long 3 Long integer variable
Object 9 Object variable
Single 4 Single floating-point variable
String 8 String variable
Variant 12 Variant variable (can contain all types specified by the definition)
Empty 0 Variable is not initialized
Null 1 No valid data

Error Codes

5 Invalid procedure call

Example:

Sub ExampleType

Dim iVar As Integer

Dim sVar As String

Dim siVar As Single

Dim dVar As Double

Dim bVar As Boolean

Dim lVar As Long

Msgbox TypeName(iVar) & " " & VarType(iVar) & Chr(13) &_

TypeName(sVar) & " " & VarType(sVar) & Chr(13) &_

TypeName(siVar) & " " & VarType(siVar) & Chr(13) &_

TypeName(dVar) & " " & VarType(dVar) & Chr(13) &_

TypeName(bVar) & " " & VarType(bVar) & Chr(13) &_

TypeName(lVar) & " " & VarType(lVar),0,"Some types in Lotus® Symphony™ Basic"

end Sub


Product Feedback | Additional Documentation | Trademarks