home *** CD-ROM | disk | FTP | other *** search
- /** QsortTest.rexx
- *
- * This is a test of QSORT
- *
- **/
- arg names
- if names = "" then names = "*"
- /*
- * FileList is a rexxarplib function.
- * It returns a stem variable who's elements (files.1, files.2 ...)
- * contain file names. files.0 contains the number of files found.
- */
- result = FileList(names, files, , E)
- say "List of files:"
- do i = 1 to files.0; say files.i; end
- /*
- * QSORT is the QuickSort function
- *
- * Calling sequence:
- *
- * QSORT(first, last, array)
- * first = number of first element to be sorted
- * last = number of last element to be sorted
- * array = stem variable array who's elements need to be sorted.
- *
- */
- call QSORT(1, files.0, files)
- /*
- * Print the result
- */
- say ""
- say "Same list, but sorted"
- do i = 1 to files.0; say files.i; end
-