Arithmetic expressionsExpressionsLogical ExpressionsRelational Expressions

Relational Expressions

< relational expression > -> < arithmetic expr. >
| < arithmetic expr. > < relational > < arithmetic expr. >
<relational> -> < |> |= |<= |>= |!=

Relational expressions can be used to compare the values produced by two expressions. Note that the syntax of the language prohibits the expression

 a < b < c
although it allows the essentially equivalent expression
 (a < b) < c

Computer Science 434
Department of Computer Science
Williams College

Arithmetic expressionsExpressionsLogical ExpressionsRelational Expressions