The sorting and searching subroutines are described in this chapter.
The sorting and searching subroutines operate on three types of data:
integer, short-precision real, and long-precision-real ( Table 143). The sorting subroutines perform sorts with or without index
designations. The searching subroutines perform either a binary or sequential
search.
Table 143. List of Sorting and Searching Subroutines
Descriptive Name | Integer Subroutine | Short- Precision Subroutine | Long- Precision Subroutine | Page |
---|---|---|---|---|
Sort the Elements of a Sequence | ISORT | SSORT | DSORT | ISORT, SSORT, and DSORT--Sort the Elements of a Sequence |
Sort the Elements of a Sequence and Note the Original Element Positions | ISORTX | SSORTX | DSORTX | ISORTX, SSORTX, and DSORTX--Sort the Elements of a Sequence and Note the Original Element Positions |
Sort the Elements of a Sequence Using a Stable Sort and Note the Original Element Positions | ISORTS | SSORTS | DSORTS | ISORTS, SSORTS, and DSORTS--Sort the Elements of a Sequence Using a Stable Sort and Note the Original Element Positions |
Binary Search for Elements of a Sequence X in a Sorted Sequence Y | IBSRCH | SBSRCH | DBSRCH | IBSRCH, SBSRCH, and DBSRCH--Binary Search for Elements of a Sequence X in a Sorted Sequence Y |
Sequential Search for Elements of a Sequence X in the Sequence Y | ISSRCH | SSSRCH | DSSRCH | ISSRCH, SSSRCH, and DSSRCH--Sequential Search for Elements of a Sequence X in the Sequence Y |