User manual

217
mikoPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
Division by Zero
If 0 (zero) is used explicitly as the second operand (i.e. x div 0), the compiler will report an error and will not gener-
ate code.
But in case of implicit division by zero: x div y, where y is 0 (zero), the result will be the maximum integer (i.e 255,
if the result is byte type; 65536, if the result is word type, etc.).
Unary Arithmetic Operators
Operator - can be used as a prex unary operator to change sign of a signed value. Unary prex operator + can be
used, but it doesn’t affect data.
For example:
b := -a;
Relational Operators
Use relational operators to test equality or inequality of expressions. All relational operators return TRUE or FALSE.
All relational operators associate from left to right.
Relational Operators Overview
Operator Operation
= equal
<> not equal
> greater than
< less than
>= greater than or equal
<= less than or equal
Relational Operators in Expressions
Precedence of arithmetic and relational operators is designated in such a way to allow complex expressions without
parentheses to have expected meaning:
a + 5 >= c - 1.0 / e // → (a + 5) >= (c - (1.0 / e))