LOTUSSCRIPT LANGUAGE


Sub statement
Example

Defines a sub.

Syntax

[ Static ] [ Public | Private ] Sub subName [ ( [ argList ] ) ]

[ statements ]

End Sub

Elements

Static


Public | Private
subName
argList
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).

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