4.13.5 Relational Expressions

Relational expressions are:

Expression Result
x < y True if x is less than y.
x <= y True if x is less than or equal to y.
x > y True if x is greater than y.
x >= y True if x is greater than or equal to y.
x = y True if x is equal to y.
x != y True if x is not equal to y.

Table 4.3: 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