Liste des Groupes | Revenir à cl c |
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>James Kuyper <jameskuyper@alumni.caltech.edu> writes:>
[on the requirements for qsort]
>I certainly would favor improved wording that made this clearer.>
In fact, simply explicitly mandating total ordering rather than
making a vague comment about consistency would probably be the
best approach.
Clearly the C standard intends to impose a weaker requirement
than that the comparison function be a total ordering.
"That is, for qsort they shall define a total ordering on the
array".
>
I presume you didn't intend to contradict that requirement, but
I can't figure out what you meant -- unless, as Ben suggested,
you're distinguishing between a total ordering of all possible
arguments and a total ordering of objects present in the array.
But even then, the standard explicitly imposes a total ordering.
(The requirements for bsearch might be weaker, but we're discussing
qsort.)
>
Can you clarify what you meant?
Les messages affichés proviennent d'usenet.