Array Parameters
If a formal parameter is an array, the actual parameter passed to that formal array must be an array designator that has the same number of dimensions as the formal array.
The types of actual arrays that can be passed to formal arrays are listed in Array Parameters. The <null value> is allowed as an actual parameter for all formal parameters that are arrays.
Table 1. Array Parameters
|
Formal Parameters |
Allowed Actual Parameters |
|---|---|
|
ASCII array |
ASCII array ASCII value array |
|
ASCII string array |
ASCII string array |
|
Boolean array |
Boolean array Direct Boolean array Boolean value array |
|
Complex array |
Complex array Complex value array |
|
Direct ASCII array |
Direct ASCII array |
|
Direct Boolean array |
Direct Boolean array |
|
Direct dinteger array |
Direct dinteger array |
|
Direct double array |
Direct double array |
|
Direct EBCDIC array |
Direct EBCDIC array |
|
Direct hexadecimal array |
Direct hexadecimal array |
|
Direct integer array |
Direct integer array |
|
Direct real array |
Direct real array |
|
Dinteger array |
Dinteger array Direct dinteger array Dinteger value array |
|
Double array |
Double array Direct double array Double value array |
|
EBCDIC array |
EBCDIC array EBCDIC value array |
|
EBCDIC string array |
EBCDIC string array |
|
Event array |
Event array |
|
Hexadecimal array |
Hexadecimal array Hexadecimal value array |
|
Hexadecimal string array |
Hexadecimal string array |
|
Interlock array |
Interlock array |
|
Integer array Real array |
Direct integer array Direct real array Integer array Integer value array Real array Real value array |
|
Task array |
Task array |
Procedure Reference Array Parameters
If a formal parameter is a procedure reference array, the actual parameter passed to that formal procedure reference array must be a procedure reference array designator that has the same number of dimensions as the formal procedure reference array.
The following must also be true:
-
The actual procedure reference array designator must have the same number of parameters as the formal procedure reference array.
-
Each parameter of the actual procedure reference array designator must have the same type as the corresponding parameter in the formal procedure reference array.
-
Each parameter of the actual procedure reference array designator must be passed in the same manner (call-by-name or call-by-value) as the corresponding parameter in the formal procedure reference array.
The types of procedure reference array designators that can be passed to formal procedure reference arrays are listed in Procedure Reference Array Parameters.
Table 2. Procedure Reference Array Parameters
|
Formal Parameter |
Allowed Actual Parameters |
|---|---|
|
ASCII string procedure reference array |
ASCII string procedure reference array designator |
|
Boolean procedure reference array |
Boolean procedure reference array designator |
|
Complex procedure reference array |
Complex procedure reference array designator |
|
Dinteger procedure reference array |
Dinteger procedure reference array designator |
|
Double procedure reference array |
Double procedure reference array designator |
|
EBCDIC procedure reference array |
EBCDIC procedure reference array designator |
|
Hexadecimal procedure reference array |
Hexadecimal procedure reference array designator |
|
Integer procedure reference array |
Integer procedure reference array designator |
|
Real procedure reference array |
Real procedure reference array designator |
|
Untyped procedure reference array |
Untyped procedure reference array designator |
Procedure Parameters
If a formal parameter is a procedure and the actual parameter is not a <null value>, the actual parameter passed to the formal procedure must be the identifier of a procedure or procedure reference for which the following is true:
-
The actual procedure has the same number of parameters as the formal procedure.
-
Each parameter of the actual procedure must have the same type as the corresponding parameter in the formal procedure.
-
Each parameter of the actual procedure must be passed in the same manner (call-by-name or call-by-value) as the corresponding parameter in the formal procedure.
The types of procedures that can be passed to formal procedures are listed in Procedure Parameters. The <null value> and procedure reference identifiers are allowed as actual parameters for all formal procedures.
Table 3. Procedure Parameters
|
Formal Parameter |
Allowed Actual Parameters |
|---|---|
|
ASCII string procedure |
ASCII string procedure ASCII string procedure reference array element |
|
Boolean procedure |
Boolean procedure Boolean procedure reference array element |
|
Complex procedure |
Complex procedure Complex procedure reference array element |
|
Dinteger procedure |
Dinteger procedure Dinteger procedure reference array element |
|
Double procedure |
Double procedure Double procedure reference array element |
|
EBCDIC string procedure |
EBCDIC string procedure EBCDIC string procedure reference array element |
|
Hexadecimal string procedure |
Hexadecimal string procedure Hexadecimal string procedure reference array element |
|
Integer procedure |
Integer procedure Integer procedure reference array element |
|
Real procedure |
Real procedure Real procedure reference array element |
|
Untyped procedure |
Untyped procedure Untyped procedure reference array element |
Simple Variable Parameters
The types of actual parameters that can be passed to formal parameters that are simple variables are listed in Simple Variable Parameters.
Table 4. Simple Variable Parameters
|
Formal Parameter |
Allowed Actual Parameters |
|---|---|
|
Boolean simple variable (call-by-name or call-by-value) |
Boolean identifier Boolean procedure identifier Boolean expression |
|
Complex simple variable (call-by-name or call-by-value) |
Complex identifier Dinteger identifier Double identifier Integer identifier Real identifier Complex procedure identifier Dinteger procedure identifier Double procedure identifier Integer procedure identifier Real procedure identifier Arithmetic expression (single or double-precision) Complex expression |
|
Double simple variable (call-by-name) |
Double identifier Double procedure identifier Arithmetic expression (double-precision only) |
|
Dinteger simple variable Double simple variable (call-by-value) |
Dinteger identifier Double identifier Integer identifier Real identifier Dinteger procedure identifier Double procedure identifier Integer procedure identifier Real procedure identifier Arithmetic expression (single or double-precision) |
|
Dinteger simple variable (call-by-name) |
Dinteger identifier Dinteger procedure identifier Arithmetic expression (dinteger only) |
|
Integer simple variable Real simple variable (call-by-name) |
Integer identifier Real identifier Integer procedure identifier Real procedure identifier Arithmetic expression (single-precision only) |
|
Integer simple variable Real simple variable (call-by-value) |
Dinteger identifier Double identifier Integer identifier Real identifier Dinteger procedure identifier Double procedure identifier Integer procedure identifier Real procedure identifier Arithmetic expression (single or double-precision) |
String Parameters
The types of actual parameters that can be passed to formal parameters that are strings are listed in String Parameters.
Table 5. String Parameters
|
Formal Parameter |
Allowed Actual Parameters |
|---|---|
|
ASCII string (call-by-reference or call-by-value) |
ASCII string identifier ASCII string procedure identifier ASCII string expression |
|
EBCDIC string (call-by-reference or call-by-value) |
EBCDIC string identifier EBCDIC string procedure identifier EBCDIC string expression |
|
Hexadecimal string (call-by-reference or call-by-value) |
Hexadecimal string identifier Hexadecimal string procedure identifier Hexadecimal string expression |
File Parameters
The types of actual parameters that can be passed to formal parameters that are files are listed in File Parameters.
Table 6. File Parameters
|
Formal Parameter |
Allowed Actual Parameters |
|---|---|
|
Direct file |
Direct file identifier Subscripted direct switch file identifier |
|
Direct switch file |
Direct switch file identifier |
|
File |
Nondirect file identifier Subscripted switch file identifier |
|
Switch file |
Switch file identifier |
Other Types of Parameters
The types of actual parameters that can be passed to formal parameters that are not arrays, procedures, simple variables, strings, or files are listed in Other Types of Parameters.
Table 7. Other Types of Parameters
|
Formal Parameter |
Allowed Actual Parameters |
|---|---|
|
Anytype |
Any allowable library parameter type; must match the corresponding type in the library procedure |
|
Connection block |
Connection library instance designator Connection block reference variable null value |
|
Event |
Event identifier An element of an event array File identifier.event-valued file attribute name Subscripted switch file identifier.event-valued file attribute name |
|
Format |
Format identifier Subscripted switch format identifier |
|
Interlock |
Interlock identifier An element of an interlock array |
|
Label (call-by-name) (call-by-value) |
Label identifier Subscripted switch identifier Designational expression |
|
List |
List identifier Subscripted switch list identifier |
|
Picture |
Picture identifier |
|
Pointer (call-by-name) |
Pointer identifier |
|
Pointer (call-by-value) |
Pointer identifier Pointer expression null value |
|
Structure block |
Structure block array element Structure block reference variable Structure block variable null value |
|
Structure block array |
Structure block array designator |
|
Switch label |
Switch label identifier |
|
Switch format |
Switch format identifier |
|
Switch list |
Switch list identifier |
|
Task |
Any task designator |

