c==============================CTOI.FOR=================================
c  Converts a character string of numbers into an integer.   /DEE 1-89
c      
      SUBROUTINE CTOI(C,INT,N)
      CHARACTER*(*) C
      INTEGER SIGN, INT, N
      INT = 0
      SIGN = 1
      DO 10 J=1, N
      IF (C(J:J) .EQ. '-') THEN
         SIGN = -1
      ELSE
        NUM = ICHAR(C(J:J))-48
        INT = INT+NUM*10**(N-J)
      ENDIF
 10   CONTINUE
      INT = SIGN * INT
      RETURN
      END         
