Boolean, comparison, and math operators
You can use a variety of Boolean, comparison, and math operators to build an expression.
Boolean operators
Boolean operators in the Expression Builder
Operator
Definition
Example
And
The component fires when all conditions are true.
Look for transactions that have a price per share greater than $99.99 AND were processed on June 15, 2001 AND were for accounts in New York.
Or
The component fires when any one of the conditions, any combination of the conditions, or all of the conditions are true.
Look for transactions that have a price per share greater than $99.99 OR were processed on June 1, 2001 OR were for accounts in New York.
Not
The component fires when all of the conditions are false.
Look for transactions that do not have a price per share greater than $99.99 AND were not processed on June 15, 2001 AND were not for accounts in New York.
Comparison operators
The following comparison operators are available. They are listed in their order of precedence.
Equal
Not Equal
This is available only in the Simple Event component.
Greater Than
Greater Than or Equal To
Less than
Less Than or Equal To
Math operators
The following math operators are available. They are listed in their order of precedence.
Multiply
Divide
Add
Subtract
Modulo (finds the remainder of division of one number by another)
Exp (raises a number to the power of another number)
Order of operations
This is the order of precedence for operators.
multiplication
division
addition
subtraction
If you use a comparison in an expression that uses a Boolean operator, you must enclose the operand that follows the Boolean operator in parentheses whenever the result of the calculation would be ambiguous if you do not use parentheses. For example, you would need parentheses to clarify whether you want
trans.frequency < 3 AND trans.deposit > 2 * (prev.deposit + 50)
or
trans.frequency < 3 AND trans.deposit > (2 * prev.deposit) + 50
.
Copyright IBM Corporation 2013. All Rights Reserved.