[Issue 11409] Array element-wise comparison

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 1 03:56:07 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11409



--- Comment #3 from daniel350 at bigpond.com 2013-11-01 03:56:03 PDT ---
(In reply to comment #1)
> Your assumption is not quite right. This is the loop comparisons goes off:
> 
> for (size_t u = 0; u < len; u++)
> {
>     int result = s1[u] - s2[u];
>     if (result)
>         return result;
> }

I understand that is more or less what the loop was going off, and I am saying,
that is inconsistent behaviour.
It also makes no sense as a comparison, because as long as the arrays aren't
equal, it will always only compare the first element!?

What the?
What kind of comparison is that for a set of operations that is on 'arrays',
not sorted data structures.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list