Next: , Previous: , Up: Expressions   [Contents][Index]


4.17.6 Relational Expressions

Relational expressions are:

ExpressionResult
x < yTrue if x is less than y.
x <= yTrue if x is less than or equal to y.
x > yTrue if x is greater than y.
x >= yTrue if x is greater than or equal to y.
x = yTrue if x is equal to y.
x != yTrue if x is not equal to y.

Table 4.5: Relational Expressions

The relational expressions apply to string as well as to numbers. When a relational operation applies to strings, case-sensitive comparison is used, e.g.:

"String" = "string" ⇒ False
"String" < "string" ⇒ True