Chapter 6 RAPID!
RAPID! syntax
158 WCDMA Options Version 6.20
Numeric expressions numExp := [signOp] numVar | numConst | numFct |
boolExp | numExp [ operator numExp ]
Where
–
signOp is the sign operator (+ or –),
–
numVar is a numeric variable,
–
numConst is a numeric constant,
–
numFct is a BASIC function that returns a numeric result,
–
boolExp is a boolean expression, as explained below
Example:
OneVar + ( LEN (AString$) – 2) * 5
This is a numeric expression that contains
– a numeric variable (
OneVar),
–a function (
LEN) of a string variable (AString$),
– the operators +, – and *
– and two numeric constants (
2 and 5).
The result of this expression will be a numeric value.
String expressions stringExp := stringVar | stringConst | stringFct { +
stringVar | stringConst | stringFct }
Where
–
stringVar is a string variable,
–
stringConst is a string constant,
–
stringFct is a BASIC function that returns a string as the result.
Note: A string expression always delivers a string.
Example:
FirstName$ + " " + LastName$ is a string expression. It delivers
back a string that contains the two string variables
FirstName$ and
LastName$, separated by a blank.
Boolean expressions Boolean expressions are more complex than the preceding ones:
boolExp := boolOperation | comparison | boolFct
Where
– boolOperation := NOT boolExp | boolExp AND | OR |
XOR boolExp
– comparison := stringExp compOperator stringExp |
numExp compOperator numExp
NOTE
A numeric expression always delivers a numeric result.