Call Statement

Causes execution to move to a procedure.

Syntax

[ Call ] procedure_name [ argument_list ]

Parts

procedure_name
Necessary name of a procedure.
argument_list
Optional – One or more expressions with a comma between each. You can put parentheses (“( )”) around the list, but they are optional.

Instructions

You can use the keyword Call when you call a procedure, but it is optional. You can also use Call when you discard a returned value.

Examples

' The next three lines are equivalent.
Call MyProc
Call MyProc()
MyProc

' The next three lines are equivalent.
Call MyProc 1, 2, 3
Call MyProc(1, 2, 3)
MyProc(1, 2, 3)

Sub MyProc(Optional a As Int, b As Int, c As Int)
    ' ...
End Sub

See also