Comparison
Logical Operators
not x
Returns the opposite of n. Accepts only boolean types.
Equivalent to the (!) unary operator.
Example:
false_ = not true
false_ = (!) true
false_ = !trueand x y
Returns true if x and y are both true, false otherwise. Accepts only boolean types.
Equivalent to the (&&) binary operator.
Example:
false_ = and true false
false_ = (&&) true false
false_ = true && falseor x y
Returns true if either x or y are true, false otherwise. Accepts only boolean types.
Equivalent to the (||) binary operator.
Example:
true_ = or true false
true_ = (||) true false
true_ = true || falseRelational Operators
eq x y
Returns true if x equals y, false otherwise. Accepts only boolean types.
Equivalent to the (==) binary operator.
Example:
true_ = eq 3 3
true_ = (==) 3 3
true_ = 3 == 3neq x y
Returns true if x does not equal y, false otherwise. Accepts only boolean types.
Equivalent to the (!=) binary operator.
Example:
true_ = neq 3 5
true_ = (!=) 3 5
true_ = 3 != 5lt x y
Returns true if x is less than y, false otherwise. Accepts only boolean types.
Equivalent to the (<) binary operator.
Example:
true_ = lt 3 5
true_ = (<) 3 5
true_ = 3 < 5gt x y
Returns true if x is greater than y, false otherwise. Accepts only boolean types.
Equivalent to the (>) binary operator.
Example:
false_ = gt 3 5
false_ = (>) 3 5
false_ = 3 > 5lte x y
Returns true if x is less than or equal to y, false otherwise. Accepts only boolean types.
Equivalent to the (<=) binary operator.
Example:
true_ = lte 3 3
true_ = (<=) 3 3
true_ = 3 <= 3gte x y
Returns true if x is greater than or equal to y, false otherwise. Accepts only boolean types.
Equivalent to the (>=) binary operator.
Example:
true_ = gte 5 3
true_ = (>=) 5 3
true_ = 5 >= 3Last updated