SCOUG-Programming Mailing List Archives
Return to [ 13 |
September |
2003 ]
>> Next Message >>
Content Type: text/plain
FWIW, I found this and other explanations at:
http://www.gus.biysk.ru/ftp/OS2/fix/F/readrexx.txt
Sheridan
SysStemSort
-----------
Syntax: result = SysStemSort(stem, order, type, start, end,
firstcol, lastcol)
Params: stem - name of stem to sort
order - 'A' or 'D' for sort order (default: ascending)
type - 'C', 'I' for comparision type (case/ignore, default: case)
start - first index to sort (default: 1)
end - last index to sort (default: last item)
firstcol - first column to use as sort key (default: 1)
lastcol - last column to use as sort key (default: last column)
Function: This call sorts all or the specified items in the stem.
Sort order can be specified as ascending or descending,
comparison type can respect or ignore the case of the strings
being compared. The sorting can further be narrowed by specifying
the first and last item to be sorted or by specifying the columns
used as the sorting key. The sort uses a quicksort algorithm, so
the order of equal elements according to the sort key is
undetermined.
This function operates only on stem arrays that specify the
number of elements in stem.0 and all elements must be numbered
from 1 to n with no omitted index.
Examples:
/* sort all elements descending, use cols 5 to 10 as key */
Call SysStemSort "MyStem.", "D",,,,5, 10
/* sort all elements ascending, ignore the case */
Call SysStemSort "MyStem.", "A", "I"
/* sort elements 10 to 20 ascending, use cols 1 to 10 as key */
Call SysStemSort "MyStem.",,,10, 20, 1, 10
Return: 0 - sort was successful
-1 - sort failed
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".
For problems, contact the list owner at
"rollin@scoug.com".
=====================================================
>> Next Message >>
Return to [ 13 |
September |
2003 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
|