Index Page
isrchi_c
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Procedure
Abstract
Required_Reading
Keywords
Brief_I/O
Detailed_Input
Detailed_Output
Parameters
Exceptions
Files
Particulars
Examples
Restrictions
Literature_References
Author_and_Institution
Version
Index_Entries

Procedure

   SpiceInt isrchi_c ( SpiceInt         value,
                       SpiceInt         ndim,
                       ConstSpiceInt  * array  ) 

Abstract

 
   Search for a given value within an integer array. Return 
   the index of the first matching array entry, or -1 if the key 
   value was not found. 
 

Required_Reading

 
   None. 
 

Keywords

 
   ARRAY,  SEARCH 
 

Brief_I/O

 
   VARIABLE  I/O              DESCRIPTION 
   --------  ---  -------------------------------------------------- 
   value     I     Key value to be found in array. 
   ndim      I     Dimension of array. 
   array     I     Integer array to search. 

   The function returns the index of the first matching array 
   element or -1 if the value is not found. 

Detailed_Input

 
   value      is the key value to be found in the array. 
 
   ndim       is the dimension of the array. 
 
   array      is the integer array to be searched. 
 

Detailed_Output

 
   The function returns the index of the first matching array 
   element in array. If value is not found, isrchi_c returns -1. 
 

Parameters

 
   None. 
 

Exceptions

 
   Error free. 
 
   1) If ndim < 1, the function value is -1. 
 

Files

 
   None. 
 

Particulars

 
   None. 
 

Examples

 
   The following table shows the value of isrchi_c given the contents 
   of ARRAY and VALUE: 

     ARRAY        VALUE   isrchi_c 
   ----------     -----   -------- 
   1, 0, 4, 2       4        2
   1, 0, 4, 2       2        3 
   1, 0, 4, 2       3       -1 

Restrictions

 
   None. 
 

Literature_References

 
   None. 
 

Author_and_Institution

 
   N.J. Bachman    (JPL)
   W.M. Owen       (JPL) 
 

Version

 
   -CSPICE Version 1.0.0, 10-JUL-2000 (NJB) (WMO)

Index_Entries

 
   search in an integer array 
 
Wed Apr  5 17:54:37 2017