Parameters

Procedures operate by passing parameters between the calling script and the procedure. The procedure uses the information in these parameters to work with variables, fields and tables, and to return values to the calling script. Three types of parameters can be used, as shown in the following illustration.

[spacer]

Parameters are classified based upon how they are used when the calling script communicates with the called script. The following table describes the different types.

[spacer]

Type

Characteristics

in

The value is passed from the calling script to the called script. The called script can’t change the value of an in parameter.

out

The value is passed from the called script back to the calling script. The called script sets the value of the out parameter.

inout

The value is passed from the calling script to the called script and then back to the calling script. The value can be used and changed by the called script, which then passes it back to the calling script.


Procedures allow up to 255 parameters to be passed between the calling script and the procedure. All parameter declarations in the procedure must be placed prior to any local variable declarations in the script. The types of the parameters for the procedure must match the types of the parameters passed from the calling script. For example, if the calling script passes an integer parameter to the procedure, the procedure must be set up to receive an integer as a parameter.

Typically, the parameters passed to and from a procedure have one of the standard storage types: boolean, currency, variable currency, date, integer, long, string and time. You can also use existing global field definitions in a dictionary when declaring parameter types. This method is used when passing items such as composites to a procedure.


Documentation Feedback