Chapter 6 RAPID!
Commands
160 WCDMA Options Version 6.20
General commands General commands are used to control the overall aspects of a program.
The following general commands are available in RAPID!:
CHAIN
Command Short description
CHAIN Connects additional RAPID! programs to the main pro-
gram.
END Ends the program.
LET Assigns an expression to a variable.
REM or ‘ Comment.
STOP Debugger breakpoint.
WAIT Halts the program for a specified amount of time.
Syntax
CHAIN stringExp
Parameters
stringExp is a string expression. It must be identical
with an existing RAPID! program file name.
Description
Loads the specified program and executes any command
lines which come before the first subroutine or function.
When this is complete, control is returned to the state-
ment following the chain command.
Global variables of the initially calling program can be
used by all chained programs.
Subs, functions and labels are global by definition and
can be used by all programs (i.e. the initially calling pro-
gram and all chained programs). Consequently, all names
of subs and labels have to be unambiguous.
Note: Subs and functions of the chained program will be
ignored and not run if not explicitly called (see example
below).
CHAIN is a perfect tool to split large programs into logi-
cal units or to build a library with modules for specific
tasks and functions. If you do so, please keep the follow-
ing hints in mind:
– In the chained program, first declare the variables
required as global,
– then write the required program code as a function or
sub.
– Use the chain statement at the beginning of the main
program. This will result in the 4400 running the pro-
gram code of the chained programs (with the excep-
tion of the functions themselves). Thus, the 4400 will
initialize all required global variables for later use.
A chained program may also chain other programs down
to a depth of four nested
CHAINs.