2015-12-14 02:15:50 -05:00
---
layout: doc_page
---
2015-12-16 02:03:10 -05:00
This expression language supports the following operators (listed in decreasing order of precedence).
2015-12-14 02:15:50 -05:00
|Operators|Description|
|---------|-----------|
|!, -|Unary NOT and Minus|
2015-12-16 02:03:10 -05:00
|^|Binary power op|
|*, /, %|Binary multiplicative|
|+, -|Binary additive|
|< , < =, >, >=, ==, !=|Binary Comparison|
|&& ,\|\||Binary Logical AND, OR|
2015-12-14 02:15:50 -05:00
2015-12-16 02:03:10 -05:00
Long and double data types are supported. If a number contains a dot, it is interpreted as a double, otherwise it is interpreted as a long. That means, always add a '.' to your number if you want it intepreted as a double value.
2015-12-14 02:15:50 -05:00
2015-12-16 02:03:10 -05:00
Expressions can contain variables. Variable names may contain letters, digits, '\_' and '$'. Variable names must not begin with a digit.
2015-12-14 02:15:50 -05:00
2015-12-16 02:03:10 -05:00
For logical operators, a number is true if and only if it is positive. (0 means false)
2015-12-14 02:15:50 -05:00
2015-12-16 02:03:10 -05:00
Also, the following in-built functions are supported.
2015-12-14 02:15:50 -05:00
2015-12-16 02:03:10 -05:00
|name|description|
|----|-----------|
|sqrt|sqrt(x) would return square root of x|
|if|if(predicate,then,else) returns 'then' if 'predicate' evaluates to a positive number, otherwise it returns 'else'|
2015-12-14 02:15:50 -05:00