

            ctoi (2) --- convert ascii string to integer             03/23/80


            _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

                 integer function ctoi (str, i)
                 character str (ARB)
                 integer i

                 Library:  vswtlb (standard Subsystem library)


            _F_u_n_c_t_i_o_n

                 'Ctoi'  converts  the integer in ASCII character representa-
                 tion at position 'i' of the given string to  binary  format.
                 'I'  is  incremented to point to the position just after the
                 integer.  If the character at position 'i'  is  not  numeric
                 when  'ctoi'  is  entered,  the  value zero is returned (the
                 exceptions are blanks and tabs; these characters are ignored
                 at the start of the number).  'Ctoi' does  not  recognize  a
                 leading plus or minus sign.


            _I_m_p_l_e_m_e_n_t_a_t_i_o_n

                 'Ctoi'  scans  the  string,  using  the  argument 'i' as the
                 starting position.  Leading blanks and tabs are skipped.  If
                 a numeric is encountered, it  is  added  to  ten  times  the
                 current value of the integer, and the scan continues; other-
                 wise, 'ctoi' exits with the desired value.


            _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d

                 i


            _S_e_e _A_l_s_o

                 itoc  (2),  gitoc  (2), gctoi (2), other conversion routines
                 ('cto?*' and '?*toc') (2)



















            ctoi (2)                      - 1 -                      ctoi (2)


