IsA operator (LotusScript Language)

Determines if an object reference variable is of a specified class or a class derived from the specified class.

Syntax

obj IsA objName

Elements

obj

Expression whose value is an object reference.

objName

String expression representing an object name.

Usage

The result of the IsA operator is TRUE if obj is of the class objName or a class derived from objName.

Obj can be a native (user defined) object, a product object, or an OLE object.

Obj can be a Variant variable, an object reference variable, or any variable element that accepts an object reference, such as an element of an array, list, or user-defined type or class. Obj can be an expression, for example, a function that returns an object or array of objects.

ObjName represents the class that is visible in the current scope if the class name defines more than one class.

Example

Sub PrintIt(objA)
     If objA IsA "ClassA" Then
          objA.Print
     Else
          Print "Not a ClassA object"
     End If
End Sub