proc.linkages

Definition/PROC, Releases: AP and R83

Linking to other procs.

Syntax

({dict} filename {item-id}) ({dict} filename {item-id}) {label} [{dict} {filename} {item-id}] [{dict} filename {item-id}] {label}

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.

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.

See Also

Command Name Type Description
proc.x Command Terminates PROC.
ue.91bc User Exit Transfers control (chains) to another PROC.
proc Definition List of PROC subjects.
ue.91a2 User Exit Transfers control (chains) to another PROC.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.