Lotus Software logo
IBM Lotus Domino Designer 8.5
  Versions 8.5 and 8.5.1






String data type

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.

See examples

Examples: String data type
Related topics
LotusScript Language Reference: Q through T
CStr function
Deftype statements
Data type conversion
Literal string construction rules
About data types




Library | Support | Terms of use |

Last updated: Monday, October 5, 2009