Relational expressions are a special kind of expression that always
evaluate to 0 or 1, 0 if the relation is false and 1 if the relation is
true. These may appear in any legal expression. (POSIX bc
requires that relational expressions are used only in if
,
while
, and for
statements and that only one relational
test may be done in them.) The relational operators are
expr1 < expr2
expr1 <= expr2
expr1 > expr2
expr1 >= expr2
expr1 == expr2
expr1 != expr2
Go to the first, previous, next, last section, table of contents.