Class statement (LotusScript Language)

Defines a class with its member variables and procedures.

Syntax

[ Public | Private ] Class className [ As baseClass ]

classBody

End Class

Elements

Public | Private

Optional. Public specifies that the class is visible outside the module where the class is defined, as long as this module is loaded. Private specifies that the class is visible only in this module.

A class is Private by default.

className

The name of the class.

baseClass

Optional. The name of another class from which this class is derived.

classBody

Declarations and definitions of class members. Class members can include member variables; member procedures (functions, subs, and properties); a constructor sub, named New; and a destructor sub, named Delete. Constants cannot be class members.

Usage

The Public keyword cannot be used in a product object script or %Include file in a product object script, except to declare class members. You must put such Public declarations in (Globals).

Rules for defining classes:

Rules for declaring member variables:

Rules for declaring member procedures:

Rules for referring to class members:

Rules for working with objects (class instances):

A class definition can include a definition for the constructor sub, named New. If the definition exists, LotusScript calls this sub each time it creates an object of that class.

A class definition can include a definition for the destructor sub, named Delete. If the definition exists, LotusScript calls this sub whenever it deletes an object of that class.

Example


Additional Documentation | Trademarks |