System information

SECTION SIX - PARAMETRIC PROGRAMMING
The GOSUB format is as follows.
GOSUB XXXX
LXXX
Line # Loop Count
(optional)
If the L is omitted the GOSUB routine will be executed once.
N1
N2
N3
N4 GOSUB 100 Main Program
N5
.
.
.
N90 M30
N100
N101
.
. Subroutine
.
N200
N201 RETURN
N202
When the GOSUB is executed in N4 the program will jump to N100 and start executing until
N201 is reached. At N201 control will transfer to N5 and lines N5 thru N90 will be executed.
The M30 will terminate the main program and keep lines 100 thru 202 from being executed
again.
Notes on Call Statement
Note 1: Subprogram call allows nesting 50 levels deep.
Note 2: See page 294, Section 2 for information on using G92 in subprograms.
Note 3: Call to full DOS name programs are allowed.
Example: CALL S:/XYZ/PRG.X
329