Filtering Data
Filter Expressions
A filter expression is a Boolean Expression. A Boolean Expression can be any of the following:
-
<Boolean Expression> AND <Boolean Expression>
-
<Boolean Expression> OR <Boolean Expression>
-
<Boolean Expression> XOR <Boolean Expression>
-
NOT(<Boolean Expression>)
-
(<Boolean Expression>)
A Boolean Expression can also be the result of a comparison:
-
<Numerical Expression> == <Numerical Expression>
-
<Numerical Expression> != <Numerical Expression>
-
<Numerical Expression> > <Numerical Expression>
-
<Numerical Expression> < <Numerical Expression>
-
<Numerical Expression> >= <Numerical Expression>
-
<Numerical Expression> <= <Numerical Expression>
A Numerical Expression can be any of the following:
-
<Numerical Expression> + <Numerical Expression>
-
<Numerical Expression> - <Numerical Expression>
-
<Numerical Expression> * <Numerical Expression>
-
<Numerical Expression> / <Numerical Expression>
-
<Numerical Expression> ^ <Numerical Expression>
-
(<Numerical Expression>)
-
<Identifier>
-
<Number>
An Identifier should match the regular expression ([Pp]@)?:?[0-9a-zA-Z_"."]+
. That is, it should be some combination of digits, letters, _
, and .
, optionally preceded by P@
/p@
and/or :
.
A Number may be in decimal or scientific notation, with a +
or -
for sign. Valid examples:
-
1
-
-1.2
-
.2
-
0.2E-20
-
+1.e+20
Standard order of operations is followed:
- Parentheses
- Exponent
- Multiplication and Division
- Addition and Subtraction
- Comparison (
==
,!=
,>
,<
,>=
,<=
) -
NOT
-
AND
-
XOR
-
OR
Future Enhancements
Some of these features might be supported in future updates, if there is demand:
- Boolean literals
- Alternate forms of operators (e.g.
EQ
instead of==
) - Scientific vs non-scientific values