###
Example

To illustrate, assume the vector A contains the elements [4, 3, 7, 1, 2]. Then:

SORT(A) = [3, 4, 1, 0, 2]

because:

A[3] < A[4] < A[1] < A[0] < A[2]

To see the elements of A in sorted order use the expression enter:

PRINT, A(SORT(A))

which prints:

1 2 3 4 7

To obtain the elements in descending order enter:

PRINT, A(REVERSE(SORT(A)))

which prints:

7 4 3 2 1