

            index (2) --- find index of a character in a string      02/24/82


            _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

                 integer function index (str, c)
                 character str (ARB)
                 character c

                 Library:  vswtlb (standard Subsystem library)


            _F_u_n_c_t_i_o_n

                 'Index'  searches the string given as its first argument for
                 the character given as its second argument.  If the  charac-
                 ter  is found, its index in the string is returned; if it is
                 not found, zero is returned.


            _I_m_p_l_e_m_e_n_t_a_t_i_o_n

                 A simple loop checks for the character  in  the  string;  if
                 found,  an  immediate  return  takes  place.   If  the  loop
                 terminates normally, the value zero is returned.


            _B_u_g_s

                 The arguments should be reversed.































            index (2)                     - 1 -                     index (2)


