Relational Operators; Relational Expression - Sanyo MBC-550 Series User Manual

Table of Contents

Advertisement

RELATIONAL OPERATORS
Relational operators are used to compare one data item
to another.
They are divided into the following six
types:
A=B Is A equal to B?
1) = Equal?
2) <> Unequal?
AOB Is A unequal to B?
3) < Less than ?
A<B Is A less than B?
A>B Is A greater than B?
*0 > Greater than?
5) <= Less or equal?
A<=B Is A less or equal B?
6) >= Greater or equal?
A>=B Is A greater or equal B?
RELATIONAL EXPRESSION
A relational expression is a combination of data items
and relational operators and is generally written as
follows:
<data item>{Relational operatorXdata item>}
The data item is an arithmetic expression or character
string.
Data items written in relational expressions
must be the same type; i.e., arithmetic expressions or
character strings. (Arithmetic expressions cannot be
compared with string data or vice versa.)
When the data items are related to each other with
relational operators, the evaluation result will become
-1 if the expression is affirmed (true) and 0 if not
affirmed (false).
3-21

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents