Definition statements
A few other statements also produce no executable code. These include Option Base, Option Compare, Option Declare, and Option Public; the Type statement; and the Deftype statements.
Besides the Type statement, the definition statements include the Class statement and the procedure definition statements: Function, Sub, Get Property, and Set Property. While these definition statements produce executable code, this code is not executed in place. LotusScript® executes a procedure only when it is explicitly invoked. When the procedure completes execution, the script execution continues from the point where the procedure was invoked. There are two pairs of procedures, however, that are executed without being explicitly invoked:
- Sub New and Sub Delete
These are executed when an object is created or deleted, respectively.
- Sub Initialize and Sub Terminate
Sub Initialize is executed when the compiled module representing the script is loaded. Sub Terminate is executed when the module is unloaded.