A subroutine procedure is a sequence of ViviFire statements between the lines
The subroutine procedure does a task, then returns control to the code that called it (known as the “caller”). The procedure does not return a value to the caller.
Each time the procedure is called, its statements execute.
They start with the first executable statement after
Execution usually continues until the line
But it can be stopped by one of the statements
Exit Sub or
You can make a procedure of type
Sub in modules, classes, objects, and traits.
It is private.
It can be called only by other code in the same (1) class, (2) object, or (3) trait, or (if not one of the three) the module.
Procedures such as
Sub can have arguments (constants, variables, or expressions) which the caller passes to it.
Sub sub_name [ parameter_list ] ' statements End Sub
Parameters as local variables
Example of declaration and call