These subroutines sort the elements of sequence x.
| x | Subroutine |
| Integer | ISORT |
| Short-precision real | SSORT |
| Long-precision real | DSORT |
| Fortran | CALL ISORT | SSORT | DSORT (x, incx, n) |
| C and C++ | isort | ssort | dsort (x, incx, n); |
| PL/I | CALL ISORT | SSORT | DSORT (x, incx, n); |
Specified as: a fullword integer. It can have any value.
The elements of input sequence x are sorted into ascending order, in place and using a partition sort. The elements of output sequence x can be expressed as follows:
By specifying a negative stride for sequence x, the elements of sequence x are assumed to be reversed in the array, (xn, xn-1, ... , x1), thus producing a sort into descending order within the array. If n is 0 or 1 or if incx is 0, no sort is performed. See reference [75].
Unable to allocate internal work area.
None
n < 0
This example shows a sequence x with a positive stride.
X INCX N
| | |
CALL ISORT( X , 2 , 5 )
X = (2, . , -1, . , 5, . , 4, . , -2)
X = (-2, . , -1, . , 2, . , 4, . , 5)
This example shows a sequence x with a negative stride.
X INCX N
| | |
CALL ISORT( X , -1 , 5 )
X = (2, -1, 5, 4, -2)
X = (5, 4, 2, -1, -2)