ADVT: Sorting filePro Arrays

Bob Stockler bob at trebor.iglou.com
Sat May 17 15:07:25 PDT 2008


Do you have a need to sort filePro arrays?  Or, if you could
easily sort them, would something you now do be a little better?

For instance, when I wrote MENU EDIT II I held the already used
Choice Characters in an array, displaying them when a new menu
element was being created.  It made it easier for the user to
comprehend them when I displayed them in sorted order, rather
then in the order in which they had been created or their order
on the menu.

I've written four processing table subroutines that sort arrays 
using four different sorting algorithms:  bubble sort, modified
bubble sort, insertion sort, and heap sort.  I've also written
one that writes the array to a temporary file, uses the OS sort
program to sort it, and then reads it back into the array.  All
of these work on all OS's.  I've also written another that works
only on UNIX/Linux it uses the USER command, AWK and /bin/sort. 

I've also written a processing table that demonstrates and times
each of the sorting methods, so one can compare them as to speed
and simplicty as being the best routine to be used for one's own
specific purposes.

Write me off list if you're interested in sorting filePro arrays.

Bob

-- 
Bob Stockler +-+ bob at trebor.iglou.com +-+ http://members.iglou.com/trebor


More information about the Filepro-list mailing list