INPUT /  OUTPUT /  LANGUAGE





eq, ne tags

Transient logic tag

Tests multiple values in a list for equality and obtains the result.

Sample usage

Fields

Primary field

Vector field
A list of values to be compared.

Secondary fields

None.

Behaviour

eq tag

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:

To test for one of the special values exactly, use the true, false, null and invalid tags.

ne tag

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.

Notes

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.

See also