LOTUSSCRIPT LANGUAGE


Declare statement (forward reference)
Example

Declares a forward reference to a procedure (a function, sub, or property), allowing calls to a procedure that has not yet been defined.

Syntax

Declare [ Static ] [ Public | Private ] procType procName [ ( [ argList ] ) ] [ As returnType ]

Elements

Static


Public | Private
procType
procName
argList
returnType
Usage

The IDE implicitly generates forward declarations of procedures; directly entering them in the IDE is unnecessary and causes syntax errors. You can %Include a file containing forward declarations of procedures contained in the file. You can directly enter in the IDE forward declarations of class properties and methods.

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).

You can make a forward declaration only at the module level or within a class.

The procedure, if it exists, must be defined in the same scope as the forward declaration. LotusScript does not generate an error if a procedure has a forward declaration but is not defined. (An error will be generated if you try to call a procedure that has been declared but not defined.)

A procedure declared within a class definition cannot be declared as Static.

The use of Static, Public, and Private keywords in a Property Get forward declaration must match their use in the corresponding Property Set forward declaration, if one exists.

Example
See Also