SUB
This keyword is used for introducing a procedure declaration.
It is a synonymous for
PROCEDURE.
[ STATIC ] { PUBLIC | PRIVATE } { PROCEDURE | SUB }
Identifier
(
[ Parameter AS Datatype [ , ... ] ] [ , ]
[ OPTIONAL Optional Parameter AS Datatype [ , ... ] ] [ , ] [ ... ]
)
...
END
[ STATIC ] { PUBLIC | PRIVATE } { PROCEDURE | SUB }
Identifier
(
[ [ BYREF ] Parameter AS Datatype [ , ... ] ] [ , ]
[ OPTIONAL [ BYREF ] Optional Parameter AS Datatype [ , ... ] ] [ , ] [ ... ]
)
...
END
This declares a procedure, i.e. a
method that returns nothing. To return a value, use
FUNCTION
The
END keyword indicates the end of the procedure.