SubProc: Difference between revisions
Jump to navigation
Jump to search
(Imported SUBPROC command page from old wiki) |
Gordon.dye (talk | contribs) No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
The '''SubProc(SU)''' command runs one [[procedure]] from within another procedure. It performs the same function for a procedure file as a [[GoSub]] [[statement]] does for a [[program]]. | The '''SubProc(SU)''' command runs one [[procedure]] from within another procedure. It performs the same function for a procedure file as a [[GoSub]] [[statement]] does for a [[program]]. This command can be issued by a program via the EXECUTE or CHAIN statement. For more details see the [[CHAIN]] statement. | ||
==Comments and Examples== | ==Comments and Examples== | ||
Line 10: | Line 10: | ||
==Syntax== | ==Syntax== | ||
SUBPROC <file name> | |||
[[Image:SubProc.png]] | [[Image:SubProc.png]] | ||
Line 19: | Line 20: | ||
==Technical Considerations== | ==Technical Considerations== | ||
<noinclude> | <noinclude> |
Latest revision as of 04:32, 27 August 2024
The SubProc(SU) command runs one procedure from within another procedure. It performs the same function for a procedure file as a GoSub statement does for a program. This command can be issued by a program via the EXECUTE or CHAIN statement. For more details see the CHAIN statement.
Comments and Examples
BR suspends the originating procedure when it finds the SubProc command in a procedure file. All active procedure files remain open and BR executes the entire sub-procedure before returning control to the originating procedure. Up to 9 levels of procedures may be nested.
The following example starts execution of the SAMPLE procedure file:
SubProc B:Sample
Syntax
SUBPROC <file name>
Parameters
SubProc requires the file name parameter, which specifies the file to be executed as a sub-procedure.