LOTUSSCRIPT LANGUAGE
Defines a sub.
Syntax
[ Static ] [ Public | Private ] Sub subName [ ( [ argList ] ) ]
[ statements ]
End Sub
Elements
Static
A sub in module scope is Private by default; a sub in class scope is Public by default.
The syntax for each argument declaration is:
ByVal argument [ ( ) | List ] [ As dataType ]
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), LotusScript assigns it the Variant data type.
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).
Arrays, lists, type instances, and objects can't be passed by value as arguments. They must be passed by reference.
A sub does not return a value.
A sub can be called in either of these two forms:
subName arg1, arg2, ...
Call subName (arg1, arg2, ...)
A sub definition can't contain the definition of another procedure (a function, sub, or property).
A sub member of a class cannot be declared Static.
You can exit a sub using an Exit Sub statement.
Your Lotus software application can provide special named subs for use in your scripts; see the product documentation for more information.
Example See Also