Apama Documentation : Developing Apama Applications : EPL Reference : Expressions : Expression operator precedence
Expression operator precedence
The following table lists the primary and bitwise expression operators in order by their precedence, from lowest to highest. See also Event expression operator precedence.
Operation
Operator
Precedence
Logical or bitwise union
or
1
Logical or bitwise exclusive or
xor
2
Logical or bitwise intersection
and
3
Unary logical or bitwise inverse
not
4
Relational
<, <=, >, >=, !=, =
5
Additive
+, –
6
String concatenation
+
6
Multiplicative
*, /, %
7
Unary additive
+, –
8
Name qualifier (dot)
.
9
Object constructor
new
9
Subscript
[ ]
9
Action call
actionName()
10
Parenthesized expression
( )
10
Stream query
from
10
Stream source template
all
10
For clarity, it is strongly recommended to use brackets in expressions. This makes it very easy to understand what an expression means. For example:
(10 * 10) > (9 * 9)
Do not use un-bracketed expressions, except where trivial. The following is equivalent to the above expression and is just about acceptable:
10 * 10 > 9 * 9
It is bad practice, however, to use an expression such as the following as it relies on intimate knowledge of the precedence:
1 + 2 - 3 * 4 / 5 < -1 or 5
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback