Let statement (LotusScript® Language)
Assigns a value to a variable.
Syntax
[ Let ] variableID = expr
Elements
Let
Optional. The Let statement is chiefly useful as a means of documenting an assignment statement. The absence of the Let keyword has no effect on the assignment.
variableID
A variable or variable element to which the value of expr is assigned. variableID can be of any data type that LotusScript® recognizes, other than an object reference, an array, or a list. variableID can take any of these forms:
- variableName
A non-array, non-list variable. The variable may not be an array or list variable, but it may be a Variant containing an array or list.
- arrayName ( subscripts )
An array element. arrayName is an array variable or a Variant containing an array.
- listName ( listTag )
A list element. listName is a list variable or a Variant containing a list.
- typeVar . memberVar
A member variable of a user-defined data type. typeVar is an instance of a user-defined data type. typeVar can be an element of an array or list. memberVar is a member variable of that user-defined data type. memberVar can be a scalar data type, a fixed array, or a Variant containing a scalar data type, an array, a list, or an object reference.
- object . memberVar object .. memberVar Me. memberVar
A member variable or property of a class. object is an expression whose value is an object reference. memberVar is a member variable or property of that class, or an element of an array member variable, or an element of a list member variable. Use Me only within a procedure defined within the class.
expr
Any expression except one whose value is an object reference. The expr must be of the same data type as variableID, or else must be convertible to the data type of variableID. The rules for data type conversion determine how (if at all) LotusScript® converts the value of expr before assigning it to variableID.
Usage
LotusScript® assigns the value of expr to the variable or variable element named by variableID.
Do not use the Let statement to assign an object reference to a variable. Use the Set statement to do that.