Boolean OperatorsBoolean operators always return a boolean result, either true or false. In the following examples, the word boolean represents a variable, constant, or expression with a boolean value. Where the word operand is used, a variable, constant, or expression of any type may be used. Elzed supports the following boolean operators:
and
boolean && boolean boolean and boolean
Returns true if both operands are true, false otherwise.
equal to
operand == operand
Returns true if the two operands have the same value, false otherwise.
exclusive or
boolean \\ boolean boolean xor boolean
Returns true if the first operand is true or the second operand is true. Returns false if both are true or both are false.
greater than
operand > operand
Returns true if the first operand is greater than the second, false otherwise.
greater than or equal to
operand >= operand
Returns true if the first operand is greater than or equal to the second, false otherwise.
less than
operand < operand
Returns true if the first operand is less than the second, false otherwise.
less than or equal to
operand <= operand
Returns true if the first operand is less than or equal to the second, false otherwise.
logical not
! boolean
not boolean
Returns the logical converse of the boolean operand.
not equal to
operand != operand operand <> operand
Returns true if the first operand is not equal to the second, false otherwise.
or
boolean || boolean boolean or boolean
Returns true if either the first or second operand is true, or if both are true. It returns false if both operands are false.
|