This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== SORT sortArry, pointerArray ====== Sort the contents of an array into a pointer array. sortArray = The data to sort (Any type may be used for this array) pointerArray = An integer array which will be used as an array of pointers into sortArray for accessing sortArray in sorted order (This array should be of type INTEGER) Note that sortArray and pointerArray are restricted to one (1) dimensional arrays. The following is an example of displaying an array in unsorted and sorted order: STRING s(999) ; Remember that arrays are 0-based, so these statements INTEGER p(999) ; will allocate 1000 elements each ; Do something here to read data into s SORT s,p INTEGER i FOR i = 0 TO 999 ; This loop will display in unsorted order PRINTLN s(i) NEXT FOR i = 0 TO 999 ; This loop will display in sorted order PRINTLN s(p(i)) NEXT