LOTUSSCRIPT LANGUAGE
Set the default data type for variables, functions, and properties whose names begin with one of a specified group of letters.
Note DefBool and DefByte are new with Domino Release 6.
Syntax
DefBool range [, range] ...
DefByte range [, range] ...
DefCur range [ , range ] ...
DefDbl range [ , range ] ...
DefInt range [ , range ] ...
DefLng range [ , range ] ...
DefSng range [ , range ] ...
DefStr range [ , range ] ...
DefVar range [ , range ] ...
Elements
range
Letters in range are case insensitive. For example, the group of letters J, j, K, k, L, and l can be designated by any one of these range specifications: J-L, L-J, j-L, L-j, J-l, l-J, j-l, or l-j.
The following table lists the Deftype statements, the data type that each one refers to, and the data type suffix character for that data type.
All Deftype statements in a module must appear before any declaration, explicit or implicit, in the module. Exception: the declaration of a constant (by the Const statement) is not affected by Deftype statements.
No range in any Deftype statement can overlap any other range in the same Deftype statement or in any other Deftype statement in the same module.
The range A-Z is special. It includes all international characters, not only the letters with ASCII codes less than 128. It is the only range specification that includes international characters. For example, to change the default data type of all variables, functions, and properties to Single (the standard data type for several versions of BASIC), specify DefSng A-Z.
Declarations that are explicit as to data type (such as Dim X As Integer, Dim Y$, or Define MyFunction As Double) take precedence over Deftype declarations.
Example See Also