LOTUSSCRIPT LANGUAGE


String data type
Example

Specifies a variable used to store text strings, using the character set of the Lotus software application that started LotusScript. All strings are stored internally as Unicode characters. Strings are translated between platform-specific characters and Unicode characters during I/O operations.

Usage

The String suffix character for implicit data type declaration is the dollar sign ($).

The declaration of a string variable uses this syntax:

Dim varName As String [* num]

The optional num argument specifies that varName is a fixed-length string variable of num characters. A fixed-length string variable is initialized to a string of null characters (the character Chr(0)).

When you assign a string to a fixed-length string variable, LotusScript truncates a longer string to fit into the declared length. It pads a shorter string to the declared length with trailing spaces.

Fixed-length strings are often used in declaring data structures for use in file I/O or C access.

An implicitly declared String variable is always a variable-length string variable.

Variable-length strings are initialized to the empty string ("").

LotusScript aligns variable-length String data on a 4-byte boundary. In user-defined data types, declaring variables in order from highest to lowest alignment boundaries makes the most efficient use of data storage space. Fixed-length strings are not aligned on any boundary.

Example
See Also