× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Yes, I know, but how does QSORT determine which occurrences are passed to
the RPG procedure for comparison?  Does it make any assumptions as to the
position of the sort field?

For example, say I have a data structure containing four fields with values
as follows that I wish to sort by the third field:
B 1 DD 5
A 1 AA 6
D 2 BB 4
C 3 CC 2

If I use QSORT, it will presumably send the first two occurrences back for
comparison and my procedure will indicate occurrence one should come after
occurrence two.  Would it then present the third occurrence for comparison
with the first two?

I would think so, but I'm not sure based on what I've read.

Donald R. Fisher, III
Project Manager
The Roomstore Furniture Company
(804) 784-7600 extension 2124
DFisher@roomstoreeast.com

<clip>
You provide the procedure that qsort uses to compare elements in order to
sort the list.  The procedure you provide can use any element in doing the
comparison.
<clip>


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.