7 Subprograms

Busy Lines

When a subprogram is accessed from a calling program, a condition is created known as a busy line or a busy subprogram.

Here is an example of a busy line:

10   A=FNX(B)
 .
 .
 .
50   DEF FNX(D)
 .
 .
 .
90   FNEND
Line 10 is busy after the subprogram at line 50 is accessed and remains busy until FNEND is executed.

Here is an example of a busy program:

100   CALL X(A,B,C)
 .
 .
 .
140   SUB X(X,Y,Z)
150   CALL You
 .
 .
 .
190   SUBEXIT
200   SUB You
 .
 .
 .
240   SUBEXIT
The subprogram X at line 140 becomes busy when it is called (line 100). The subprogram remains busy until it is exited.

Busy lines and subprograms can have an effect when editing a running program or executing LINK, DEL SUB, or DEL FN. Attempting to delete or alter a busy line causes an error message. In order to delete or alter the line, either program execution will have to be STOPped or control must be "returned" to the calling program segment (for example, RETURN, EXIT). LINK is described in page 195 .


Eloquence Language Manual - 19 DEC 2002