Chapter 6 RAPID!
Commands
WCDMA Options Version 6.20
175
Branch commands With the help of these commands, it is easy to branch program execution, e.g.
depending on conditions or user entries.
ERROR
GOSUB ... RETURN
SELECT CASE Day$
CASE "MONDAY","TUESDAY","WEDNESDAY",
"THURSDAY,"FRIDAY"
PRINT "Got to work!"
CASE "WEEKEND" : PRINT "I’m off for
the seaside!"
END SELECT
Command Short description
ERROR Creates an error with a specified error number.
GOSUB
...
RETURN
Branches to the specified label and returns at the next
RETURN command.
GOTO Branches to the specified label.
ON ERROR Branches to the specified label, if an error occurs during
program execution.
Syntax
ERROR errNo
Parameters
errNo is an integer number.
Description
Creates a runtime error with the specified error number.
This command enables you to create your own error
codes.
Note: For the built-in error codes, please refer to the
table of Runtime errors.
Examples
The following example defines an error code based on a
simple condition and gives a first idea of error handling.
IF (frequ > 2 GHz) THEN ERROR 57
...
SELECT CASE err
case 57 : Print "Input out of range!"
END CASE
Syntax
GOSUB targetLabel
[instructions]
RETURN
Parameters
targetLabel is a label.