|
Procedure Definition
A procedure is defined with the new GPP_PROCDEF statement, followed by optional GPP_PROCPARAM statements if procedure parameters are required.
GPP_PROCDEF <proc-name> ;
Sequence of statements to be executed
Like an executable block, the procedure definition comes to an ends when the next procedure or executable block is encountered. There is no special "procedure end" statement.
The procedure name should follow the standard GPP2 user variable naming conventions (For example, StartOfProc).
GPP_PROCDEF <proc-name> ;
GPP_PROCPARAM (<format-name>) param1 param2 ... ;
Sequence of statements to be executed
The GPP_PROCPARAM statement defines one or more parameters of a given GPP format. The parameter type (numeric or string) is also derived from the format.
It is possible to use multiple GPP_PROCPARAM statements in order to define parameters of different formats and types. For instance:
GPP_PROCDEF Myproc1 ;
GPP_PROCPARAM (USER_1) X Y Z; // numeric parameters
GPP_PROCPARAM (CHARACTER) MSG; // string parameter
Sequence of statements to be executed
|