c_pxinx - Returns the index of the first element equal to val

SYNTAX

#include "worgen.h"

FUNCTION c_pxinx (in, val, ns, index, dtype)

     long               *in;
     long               *val;
     long               *ns;
     long               *index;
     long               *dtype;

PARAMETERS

in (input, 'dtype')

Input array.

val (input,'dtype')

Value of element in array to be matched. Must be same type as in.

ns (input, integer)

Number of elements in the input array.

index (output, integer)

Index into array of first value equal to val.

dtype (input, integer)

Integer value representing the type of data. Legal values include:

     = EBYTE(1):     unsigned byte data
     = EWORD(2):     signed two byte data
     = ELONG(3):     signed four byte data
     = EREAL(4):     four byte floating point data

DESCRIPTION

c_pxinx() searches an array to find the first value in the array which is equal to the value specified in the variable val.

RETURN VALUE

c_pxinx() returns

      
     E_SUCC --> successful completion
     TYPERR --> invalid type specified