LOTUSSCRIPT LANGUAGE
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
If this keyword is present, it must also be present in the definition of the procedure.
Private indicates that the declared procedure is visible only within this module. If this keyword is present, it must also be present in the definition of the procedure.
Function Sub Property Get Property Set
The syntax for each argument declaration is:
[ ByVal ] argument [ ( ) | List ] [ As type ]
argument() is an array variable. argument List identifies argument as a list variable. Otherwise, argument can be a variable of any of the other data types that LotusScript supports.
As dataType specifies the variable's data type. You can omit this clause and use a data type suffix character to declare the variable as one of the scalar data types. If you omit this clause and argument doesn't end in a data type suffix character (and isn't covered by an existing Deftype statement), its data type is Variant.
If you omit As returnType, the function name's data type suffix character appended to procName (the function name) determines the return value’s type. Do not specify both a returnType and a data type suffix character.
If you omit As returnType and procName has no data type suffix character appended, the function returns a value either of data type Variant or of the data type specified by a Deftype statement.
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