Next: , Previous: Equality Tests, Up: Conditions


6.5.2 The Operators less, less_equal, greater, greater_equal

A condition of type expr1 operator expr2 compares two numbers. Here, operator can have the following values:

less
The condition holds if expr1 has a smaller value than expr2.
less_equal
The condition holds if expr1 has a smaller value than expr2 or both numbers are equal.
greater
The condition holds if expr1 has a bigger value than expr2
greater_equal
The condition holds if expr1 has a bigger value than expr2 or both numbers are equal.

If either expr1 or expr2 is no number, an error will be reported.