GoTo
GOTO label
The GoTo statement transfers program control to a specified line number or label. The GOTO statement not be executed from the command line. Error 1011 (Illegal immediate statement) will occur if such usage is attempted.
Comments and Examples
The following example transfers control to line number 45:
00320 GOTO 45
In the next example, where the GOTO points to a line label, control is transferred to the first executable statement after the label:
1000 GOTO START
Syntax
Parameters
GOTO has one required parameter: "line-ref". This is the line number or label that program control is to be transferred to.
Technical considerations
- See the ON GOTO statement for a method of branching to one of several lines depending on the value of a numeric expression.