Event expression operator precedence
The following table lists the event expression operators in order by their precedence, from lowest to highest. See
Expression operator precedence for a corresponding table of primary and bitwise expression operator precedence.
Operation | Operator | Precedence |
Followed-by | -> | 1 |
Logical union | or | 2 |
Logical exclusive or | xor | 3 |
Logical intersection | and | 4 |
All | all | 5 |
Logical negation | not | 6 |
For clarity, it is strongly recommended to use brackets in event expressions. This makes it very easy to understand what an expression means. Do not use un-bracketed expressions, except where trivial.
For example, the following expression:
on all A()or B() and not C() -> D()
is equivalent to this expression, which is much easier to understand:
on (
(all A() )
or
(B() and (not C() ))
) -> D()