Is operator (LotusScript® Language)

Compares two object reference variables.

Syntax

obj1 Is obj2

Elements

obj1, obj2

Expressions whose values are object references.

Usage

The result of the Is operator is TRUE only if obj1 and obj2 refer to the same object or if both operands evaluate to NOTHING. Otherwise, the Is operation returns False (0).

The operands obj1 and obj2 may be Variant variables, object reference variables, the constant NOTHING, or any variable elements that accept an object reference, such as an element of an array, list, or user-defined type.

Example

Class MyClass
   ' ...
End Class
Dim x As MyClass
Dim y As MyClass
Set x = New MyClass
Set y = New MyClass
Print x Is y         ' Prints False
Set x = y            ' x now refers to the same object as y.
Print x Is y         ' Prints True