The Sort() method returns the array itself as a list result, so it is possible to follow the call to the
Sort() method immediately with a call to the
Invert() method, which will return a descending sort:
An alternative approach is an indirect sort using the method SortedIndices() which returns a
REAL array representing new index positions for the array elements in their sorted positions:
More important, the index values in !NewPositions can be used to sort other arrays as well.
Would create a new array !index representing the subscript values of the array elements in
!Animals then sort these index values (without altering the array
!Animals). After the sort,
!index would look like this: