Call statement (LotusScript Language)

Calls a LotusScript® sub or function.

Syntax 1

Call subOrFunction [ ( [ argList ] ) ]

Syntax 2

subOrFunction [ argList ]

Syntax 3

subOrFunction ( argPassedByVal )

Syntax 4 (functions only)

returnVal = function [ ( [ argList ] ) ]

Elements

subOrFunction

The name of the sub or function being called.

argList

A list of arguments, separated by commas, for the sub or function being called.

argPassedByVal

A single argument to be passed by value to the sub or function being called.

function

The name of the function being called.

returnVal

The assignment variable containing the function's return value.

Usage

When you use the Call keyword, you must include parentheses around the argument list. If there are no arguments, the empty parentheses are optional.

When you omit the Call keyword, the following parenthesis rules apply:

Sub calls do not return a value.

LotusScript uses a function's return value if the function call appears in an expression. The call can appear anywhere in an expression where the data type of the function's return value is legal. Function calls that use the Call keyword, however, do not return a value and cannot appear in an expression.

LotusScript always uses the return value of a call to a built-in function. You must use its return value in an expression, and you cannot use the Call keyword.

Referencing a function that returns an array, list, or collection

If a function returns an array, list, or collection, a reference to the function can contain subscripts according to the following rules:

Example


Additional Documentation | Trademarks |