Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 values 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 one way to interpret these this with the SUBSET 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

...