System Debug Reference Manual (32650-90888)

38 Chapter2
User Interface
Operator Precedence
Expression operands may be literals, variables, functions, macros, and symbolic procedure
names, each of which denotes a value of some type. Examples of valid expressions are:
$12 Simple numeric literal
pc + 4 Predefined variable
FOPEN + 12 Symbolic procedure name
[dst 2.104] Indirection - contents of DST 2.104
(count < 5) and (q>200) Boolean expression with relational operators
strup('hello') + "MOM" Standard function result
Operator Precedence
The precedence ranking of an operator determines the order in which it is evaluated in an
expression. The levels of ranking are:
Operators of highest precedence are evaluated first. For example, since * ranks above +,
the following expressions are evaluated identically:
(x + y * z) and (x + (y * z))
When operators in a sequence have equal precedence, evaluation proceeds from left to
right. For example, each of the following expressions are evaluated identically:
(x + y + z) and ((x + y) + z)
Table 2-6. Operator Precedence
Precedence Operators
highest
[ ]
. NOT, BNOT
. <<, >>, BAND, BOR
. *, /, MOD, AND
. +, -, OR
lowest
<, <=, =, >, >=, <>