Call OSRCHM( n, x, incx, target, mask, shift, index, where, num )
n Integer. The number of elements of vector x to be searched. x Integer vector. The ordered integer input vector to be searched. incx Integer. The increment between elements of vector x. A positive increment indicates an ascending vector and returns the index of the first element encountered, starting at the beginning of the vector. A negative increment indicates a descending vector and returns the index of the first element encountered, starting at the end of the vector. target Integer. The target of the search. mask Integer. A right justified bit mask used to extract subfields from right shifted elements of vector x. shift Integer. The number of bits each element of vector x is right shifted before its subfield is extracted. index Integer. The index of the first element of vector x containing target. Exceptions: (1) If n is less than one, index = 0 (2) If no element equals target, index = n+1. where Integer. The index of the first location in array x that would contain target if it were found. (If target is found, index = where). Exception: if n is less than one, where = 0. num Integer. The number of target elements found in array x. For the total number of occurrences of target in array x, this parameter must be specified nonzero.
Subroutine OSRCHM searches ordered integer array x and returns the index of the first location containing a subfield equal to an integer target. The total number of occurrences of target in array x can also be returned. For equations and other information, see Volume 3: UNICOS Math and Scientific Library Reference Manual SR-2081 7.0, Cray Research, Inc.