function returns a vector of subscripts that allow access to the elements of
in ascending order. The result is always a vector of longword type with the same number of elements as
Result = SORT(
The array to be sorted.
can be any basic type of vector or array. String arrays are sorted using the ASCII collating sequence. Complex arrays are sorted by their magnitude.
To illustrate, assume the vector A contains the elements [4, 3, 7, 1, 2]. Then:
SORT(A) = [3, 4, 1, 0, 2]
A < A < A < A < A
To see the elements of A in sorted order use the expression enter:
1 2 3 4 7
To obtain the elements in descending order enter:
7 4 3 2 1