LOTUSSCRIPT LANGUAGE


Set statement
Example

Assigns an object reference to a variable, or associates an object with a variable.

Use one of the following three syntaxes:

Syntax 1: Create an object and assign a reference

Set var = New class [ ( [ argList ] ) ]

Elements

var


class
argList
Syntax 2: Copy an existing object reference to another variable

Set var1 = var2

Elements

var1


var2
Syntax 3: Associate a product object with a variable

Set var = Bind [ prodClass ] ( objectName )

Elements

var


Bind
prodClass
objectName
Usage

The Set statement is the object reference assignment statement. It is parallel to the Let statement, the general assignment statement for variables of all types except object reference variables.

When you use the user interface, rather than a script, to create a product object, some Lotus products implicitly declare the name you (or the product) have assigned the object as an object reference variable and bind it to the object. This allows you to use the object name in scripts without explicitly declaring a variable and binding it to the object.

To test an object reference variable for the NOTHING value, use the Is operator.

Language cross-reference

@Set function in formula language

Example
See Also