Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#445 Operators <, <=, >, >= return () not false

v8.6.1
closed
Michael Kay
5
2012-10-08
2005-12-22
Michael Kay
No

When the operators <, <=, >, >= are used with two
operands neither of which can be determined at compile
time to be a singleton, the expression (A > B) is
rewritten as (min(A) gt max(B)) (and similarly for the
other operators). This rewrite is incorrect, because it
causes the expression to return an empty sequence
rather than false when one of the operands is an empty
sequence.

(In most situations this won't matter, because the
effective boolean value of an empty sequence is false;
but the difference shows up when the expression is used
in a non-boolean context).

Source code fixed.

Discussion