Chapter 6 RAPID!
Commands
176 WCDMA Options Version 6.20
GOTO
ON ERROR, RESUME
Description
Branches the program to the symbolic label and contin-
ues program execution with the commands following
that label.
As soon as the
RETURN command is encountered, pro-
gram execution will come back to the command follow-
ing the initial
GOSUB command.
Example
IF Day$="Friday" THEN GOSUB fishDay
ELSE GOSUB meatDay
...
fishDay
PRINT "Today we eat fish!"
RETURN
...
meatDay: PRINT "Today we will have a
steak!"
RETURN
Syntax
GOTO targetLabel
Parameters
targetLabel is a label.
Description
Branches to the symbolic label and continues program
execution with the commands following that label.
Examples
...
IF i>10 THEN GOTO loopOver
...
loopOver: PRINT "Ten steps later..."
Syntax
ON ERROR { GOTO {targetLabel | 0} |
RESUME NEXT }
...
RESUME [ NEXT | targetLabel ]
Parameters
targetLabel is a label.