Logical Operators
Logical operators are used to combine boolean assertions. Analytica uses the values True=1 and False=0.
When applied to values other than 0 or 1, other parameter values are interpreted as follows:
- a non-zero numeric is treated as true
- NaN is treated as ambiguous (could be 0 or 1)
- Null results in a warning, with a Null result.
- Any other data type results in an error.
Note: The value special Undefined is considered deprecated in Analytica 4.0. Null is now used exclusively for a non-existent value from within Analytica expressions.
And
A And B
True if both A and B are true. False if either A or B is false.
In this table, x signifies a numeric value that is not equal to zero (and is not NaN).
And | 0 | x | NaN | Null |
---|---|---|---|---|
0 | 0 | 0 | 0 | 0 |
x | 0 | 1 | NaN | Null |
NaN | 0 | NaN | NaN | Null |
Null | Null | Null | Null | Null |
Or
A or B
True if A or B or both are true.
In this table, x signifies a numeric value that is not equal to zero (and is not NaN).
And | 0 | x | NaN | Null |
---|---|---|---|---|
0 | 0 | 1 | NaN | Null |
x | 1 | 1 | 1 | Null |
NaN | NaN | 1 | NaN | Null |
Null | Null | Null | Null | Null |
Not
Not | 0 | x | NaN | Null |
---|---|---|---|---|
1 | 0 | NaN | Null |
Comments
Enable comment auto-refresher