How You Can Define Local Procedures
Use the following syntax to define a local procedure:
procedure procname [([parameterlist])] =
[declare
localvariablelist
[enddeclare]]
begin
statementlist
end[;]
For more information about the
parameterlist, see
Procedure Statement (see
Procedure Statement).
For more information about the declare block, see
Initialize Statement (see
Initialize Statement).
The runtime system searches local scopes of the currently executing frame or procedure and executes the local procedure if it is in the callproc string variable.