COMPARE Expression
COMPARE compares one or more numeric or text values and returns 1 for true or 0 for false.
Syntax
NUM and TXT are the exact production mode names and are case-sensitive.
Supported operators are:
Nested ACE expressions in the argument list are resolved before COMPARE itself is evaluated; COMPARE is not lazy control flow.
Numeric mode
With NUM, every argument is parsed as a number.
For multiple values:
==is true when every value equals the first value;!=is true when at least one later value differs from the first value;<requires a strictly increasing sequence;<=requires a non-decreasing sequence;>requires a strictly decreasing sequence;>=requires a non-increasing sequence.
Examples already present in ACE's reference/tests:
Text mode
With TXT, == and != compare string content. The ordering operators <, <=, >, and >= compare std::string::length() values, not alphabetical/lexicographical order. For multiple values, the same sequence rules described above are applied to those lengths.
Existing examples:
A single comparison argument is considered true by the production implementation, regardless of the selected operator.