SUB...ENDSUB

Concept Link IconSee also Concept Link IconExample

Define the start and end of a function.

WebVue support - Yes.

Syntax

SUB subname([P1, P2 ......P10])

    [instruction list]

ENDSUB

Argument

Meaning

P1 to P10

Parameters to be passed to the function. All types supported.

Execution

A function subname is created. The parameters are not type cast but they must match the use within the function or a run time error will occur.

It is obligatory to have one MAIN routine per program (except for the global declaration program).

A value may be returned from a function using RETURN.

Example

For an example, select the Example link above.