GOSUB
Go to a label with option to return.
Synopsis
GOSUB nnn
Arguments
nnn | An integer specifying a label. For further details on labels, refer to the GO command. |
Description
The GOSUB PROC command redirects execution to the specified label location. You can then use RSUB to return to the line following the GOSUB command.
Example
The following example shows GOSUB jumping to label 10, then RSUB returning to the X (exit) command following the GOSUB:
PQN
MV %1 "A"
IF %1 = "A" GOSUB 10
XEnd of PROC
ODon't Display this
10 ODisplay this
RSUB