User`s manual
Relation operators (Comparison Operators) are commonly used in conditional and
loop statements to control the program flow.
In general case:
Expression1 (relation operator) Expression2,
expression1 and expression2 can be any legal expression. Be familiar with how
implicit conversion works with relations operators. You can compare signed and
unsigned values.
1. Complex expression is decomposed to a number of simple expressions, with
respect to operator precedence and overriding parenthesis.
2. Simple expression is now treated in the following manner: if operands are of the
same type, operation is performed, assuming that the result is of the same type.
3. If operands are not of the same type, then less complex operand (speaking in
terms of data range) is extended:
mikroBASIC
- Basic Compiler for Microchip PIC microcontrollers
84
mikroBASIC
MikroElektronika: Development tools - Books - Compilers
making it simple...
page
Relation (Comparison) Operators
Overview
Operator Operation Operand Types Result Types
= equality All simple types True or False
<> inequality All simple types True or False
< less-than All simple types True or False
> greater-than All simple types True or False
<= less-than-or-equal All simple types True or False
>=
greater-than-or-
equal
All simple types True or False
Rules for
Comparing
Expressions