Progress
Programming
Handbook
Procedure Parameters
A procedure parameter passes a value to a procedure or returns a value from a procedure at run time. To define a parameter for a procedure, you specify the DEFINE PARAMETER statement in the procedure block. This statement can appear anywhere before you first reference the parameter in the procedure. The required information you specify in the DEFINE PARAMETER statement includes:
Input parameters pass data to a procedure when it is called, and output parameters return data from the called procedure to the calling procedure when the called procedure completes execution. Buffers are always passed for input-output. In general, the data items passed in the RUN statement must match, in data type and order, the corresponding parameters defined in the called procedure.
In the previous examples, the RUN statement in
p-exprc2.p
passes vcust–num and vname to the parameters pcust–num and pname, respectively inp-exprc1.p
. For more information on procedure parameters, see the Progress Language Reference .
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |