Linkages

Linkages are 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. For example:

( )

Parentheses transfer control to the Proc in the designated file name as a one-way transfer (like the chain command in FlashBASIC, 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 transfer control to the Proc in the designated file name as a two-way transfer (like the call command in FlashBASIC, 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.

Brackets can be used as an internal subroutine call when both the file name 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} file.name {item-ID})

({dict} file.name {item-ID}) {label}

[{dict} {file.name} {item-ID}]

[{dict} file.name {item-ID}] {label}

Example(s)

Transfers control to example1 in the procs file. Control returns to the next line in the current Proc upon completion.

[procs example1]

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.

[procs example2] 25

Transfers control to statement label 150 in the current Proc and begins execution.

[] 150

Transfers control to the procs file, using the item-ID indicated in the input buffer.

(procs)

See Also

PROC Processor, u91a2 User Exit, u91bc User Exit, x Command