CXML

OSRCHF (3sciport)


SYNOPSIS

  Call OSRCHF( n, x, incx, target, index, where, num )

ARGUMENTS

  n               Integer.
                  The number of elements of vector x to be searched.

  x               Real vector.
                  The ordered real 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          Real.
                  The target of the search.

  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.

DESCRIPTION

  Subroutine OSRCHF searches ordered real array x and returns the index of
  the first location that contains a real 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.

CXML Home Page

Index of CXML Routines