System Debug Reference Manual (32650-90888)
30 Chapter2
User Interface
Operators
Operators are classified as arithmetic, Boolean, relational, address, and concatenation. A
particular operator symbol may occur in more than one class of operators. For example, the
symbol '+' is an arithmetic operator representing numeric addition, as well as string
concatenation.
The table below summarizes the System Debug supported operators by operator class, and
lists the possible operand and operator result types. The following subsections discuss the
operators in detail.
Arithmetic Operators
Arithmetic operators perform integer arithmetic. The operators include the familiar +, -,
*, /, and MOD. The operator / computes the integer quotient of two numbers, while MOD
computes the remainder. The result of MOD is always nonnegative, regardless of the sign of
the left operand. This implementation of MOD is the same as that in HP Pascal, which
defines the result of i MOD j, j > 0, to be
i - k * j
for some integer k, such that
Table 2-3. Operators
Class Operator Operand Types Result Types
Arithmetic + (addition)
- (subtraction)
* (multiplication)
/ (division, quotient)
MOD (division, modulus)
INT, PTR INT, PTR
Boolean AND (logical and)
OR (logical or)
NOT (logical not)
BOOL, INT BOOL
Bit BAND (bitwise and)
BOR (bitwise or)
BNOT (bitwise not)
<< (left shift bits)
>> (right shift bits)
INT, PTR INT, PTR
Relational < (less than)
<= (less than or equal to)
= (equal)
<> (not equal)
>= (greater than or equal to)
> (greater than)
BOOL, INT,
PTR, STR
BOOL
Address [ ] (indirection) PTR U16, U32
String + (concatenation) STR STR