Page History
...
The operator '=' compares two values and returns the boolean value TRUE if the left value is equal to the right value and FALSE otherwise.
Syntax
Code Block |
---|
value1 = value2 |
- value1 - Number, date or attribute of some type of number or date.
- value2 - Number, date or attribute of some type of number or date.
When one or both of the values is are a set, the '=' operator is translated to SUBSET OF:
"a" = ["a", "b"]
is equivalent to"a" SUBSET OF ["a","b"]
, which returns true["a", "b"] = "a"
is also equivalent to"a" SUBSET OF ["a","b"]
, note that the arguments are switched. Because we have a set and a single value, there is only way to interpret these with theSUBSET OF
function.["a"] = ["a", "b"]
is equivalent to["a"] SUBSET OF ["a","b"]
, which returns true["a", "b"] = ["a"]
is equivalent to["a", "b"] SUBSET OF ["a"]
, which returns false. (note that if "set1 = set2" returns true, it does not mean that "set2 = set1" will also return true)
To test if two sets are equal you could use the expression:
Code Block |
---|
L1 SUBSET OF L2 AND L2 SUBSET OF L1 |
Return type
- boolean
Examples
- 1 = 2 returns FALSE
- 1.0 = 1.0 returns TRUE
- DATE(2012,1,1) = TODAY returns FALSE
- 5 + 5 = 10 returns TRUE
...
Overview
Content Tools