equals (==)
- Details
- Last Updated on Tuesday, 15 January 2013 09:44
syntax
- eq(a, b)
- a == b
definition
eq(a, b) or a == b results in a boolean data item indicating if the values of data item a are equal to the values of data item b.
description
The comparison between two missing values (null == null) results in the value false.
applies to
Data items with value types:
- groups: Numeric, Point
- string
- bool
conditions
Data items a and b need to match with regard to their:
- value type
- metric
- domain unit (constants or parameters can be used in comparisons with data items of each domain unit)
since version
5.15
example
1. attribute<bool> AisB (CDomain): expr = "eq(A, B)";
2. attribute<bool> AisB (CDomain): expr = "A == B";
| A | B | AisB | |
| 0 | 0 | True | |
| 1 | 2 | False | |
| 2.5 | 2.5 | True | |
| -100 | 100 | False | |
| 999 | -999 | False | |
| null | 0 | False | |
| null | null | False | |
| 0 | null | False | |
| null | 100 | False | |
| 100 | null | False |