Boolean expressions
A Boolean expression is an expression which results in TRUE or FALSE. It includes
Boolean literals (TRUE or FALSE), Boolean variables (Boolean type variable accessed
with the BOOLEAN keyword) or Boolean operations. There are three Boolean operations
supported by the application. NOT requires only one operand, however, BOTH and EITHER
require two operands:
NOT (booleanExpression)
BOTH (booleanExpression1 AND booleanExpression2)
EITHER (booleanExpression1 OR booleanExpression2)
If NOT's operand is TRUE, the result is FALSE. If NOT's operand is FALSE, the result is TRUE.
If BOTH’s two operands are TRUE, the result is TRUE; otherwise the result is FALSE. If one
of EITHER’s two operands is TRUE, then the result is TRUE; if both are FALSE, the result is
FALSE.
Boolean expressions can be nested. For instance, the first operand of a BOTH operation
can be a Boolean operation in itself.
Here are valid Boolean expressions:
TRUE
FALSE
BOOLEAN(boolVar) //where boolVar is a previously-declared BOOLEAN variable.
NOT(TRUE)
BOTH(TRUE AND FALSE)
EITHER(TRUE OR FALSE)
EITHER(BOOLEAN(boolVar1) OR BOOLEAN(boolVar2))
Only Boolean expressions can be assigned to variables with a Boolean type.