Tests multiple values in a list for equality and obtains the result.
<eq 1,1> generates true.<eq 1,2> generates false.<ne 1,2> generates true.<eq 10, 10, 10> generates true.None.
The equality test is true if all the values in the list are equal. The result
is false if one of the values differs, and invalid if fewer than
two values are provided for comparison.
How values are compared depends on their types:
<eq 1, 1.0> is true.<eq {1}, {1.0}> is false.<eq 1, {1}>. Convert text with num
first to compare it as a number.<eq 2, true>, <eq {x}, true> and <eq 0, false> are
all true. (The text {false} isn't empty, so it counts as true.)0, empty text {} and false.To test for one of the special values exactly, use the true, false, null and invalid tags.
The behaviour of the ne tag is functionally equivalent to compounding the not and eq
tags together, as <not|eq . . . . >, but in a shorter single-tag form.
Note that you cannot compare two vectors (e.g. v1 and v2) using the eq tag in the way you would compare two ordinary values. This behaviour is due to the way ioL will expand out a vector assigned to a field, to form part of the list of values assigned to that field.
<v1:vector 1,2,3> <v2:vector v1> <eq v1,v2>
Here, even though v1 and v2 contain the same values, the above example generates false since the equality is tested as <eq 1,2,3,1,2,3>
and the values differ.