proc.linkages Definition/PROC

proc.linkages

Command proc.linkages Definition/PROC
Applicable release versions: AP, R83
Category PROC (92)
Description the means by which PROCs either pass control one-way to another PROC, or call another PROC as an external subroutine.

The type of "linkage" is determined by the character used in the syntax.

"( )" (parentheses) Transfers control to the PROC in the designated filename as a "one-way" transfer (like the "chain" statement in Pick/BASIC, meaning that it does not return control upon completion). If no item-id is specified, the default item-id is the value in the current position of the input buffer. Control is not returned to the calling PROC. The optional "label" parameter indicates the statement label number where execution should begin.

"[ ]" (brackets) Transfers control to the PROC in the designated filename as a "two-way" transfer (like the "call" statement in Pick/BASIC, meaning that it will eventually return). Control returns to the next executable statement in the calling PROC upon completion. If no item-id is specified, the item-id defaults to the value in the current position of the input buffer.

The "[ ]" form may be used as an "internal" subroutine call, when both the filename and item-id are omitted, and a statement label is included. The "internal" subroutine "returns" to the next line after the "call" when it encounters an "x" command.
Syntax ({dict} filename {item-id})
({dict} filename {item-id}) {label}
[{dict} {filename} {item-id}]
[{dict} filename {item-id}] {label}
Options
Example
[procs example1] 
Transfers control to 'example1' in the 'procs' file. 
Control returns to the next line in the current PROC upon completion. 

[procs example2] 25 
Transfers control to 'example2' in the 'procs' file, and 
begins execution at statement label 25. Control returns to the next line in the 
current PROC upon completion. 

[] 150 
Local subroutine call. Transfers control to statement label 150 in the current 
PROC and begins execution. 

(procs) 
Transfers control to the 'procs' file, using the item-id indicated in 
the input buffer.
Purpose
Related proc.x
ue.91bc
proc
ue.91a2