GOTO [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Reference Manual
GOTO
The GOTO statement unconditionally transfers control to a specified line.
The line must be in the same program unit as the GOTO statement. If the
line is not executable (a comment or declaration, for example) HP
Business BASIC/XL executes the first executable statement following it.
Syntax
{GOTO }
{GO TO} line_id
Parameters
line_id Line number or line label of the line that control
transfers to. It must be in the same program unit as
the GOTO statement. Although the GOTO statement can be
entered as either GO TO or GOTO, HP Business BASIC/XL
will always list it as GOTO.
Examples
10 GOTO 30 !Transfer control to line 30
20 A = 1 !Never executed
30 A = 2 !Executed immediately after line 10
40 GO TO Remark !Transfer control to line 60
50 PRINT "HI" !Never executed
60 Remark: !Unexecutable statement; execute next line
70 PRINT A !Executed after line 40
99 END
Line 40 will list as GOTO Remark.
MPE/iX 5.0 Documentation