Loading...
Select Version
&pagelevel(4)&pagelevel
Domain: PROCEDURE
Command description
GOTO branches to the specified tag and continues procedure execution from that location. The tag must be defined in the same or a surrounding block (see Example 2). In addition, the tag must be unique to the procedure. (See also the section “Random branch destinations” for more on GOTO)
Note
Expression replacement (&...) is not permissible for this command.
Format
GOTO |
LABEL = <structured-name 1..255> |
Operands
LABEL = <structured-name 1..255>
Name of the tag where procedure execution is to resume; the name is specified without the terminating colon.
Command return codes
(SC2) | SC1 | Maincode | Meaning |
0 | CMD0001 | No error | |
1 | CMD0202 | Syntax error | |
1 | SDP0118 | Command in false context | |
1 | SDP0139 | Back branch limit reached | |
1 | SDP0223 | Incorrect environment | |
3 | CMD2203 | Incorrect syntax file | |
32 | CMD0221 | System error (internal error) | |
130 | SDP0099 | No further address space available |
Example 1
. . . /GOTO TAG10 . . . /TAG10: CREATE-FILE ...
Example 2
/LOOP1: WHILE (A < B) /ADD1: X = X + A /LOOP2: WHILE (X < Y) /ADD2: A = A + 1 / GOTO ADD1 "Permitted, because outer loop" / END-WHILE LOOP2 / GOTO ADD2 "Forbidden, because inner loop" / END-WHILE LOOP1