      REAL FUNCTION READA(A,ISTART,ERROR)
      IMPLICIT REAL (A-H,O-Z)
      LOGICAL ERROR, EXPON
      CHARACTER*(*) A
      CHARACTER*40 DUMMY
      IZERO = ICHAR('0')
      ININE = ICHAR('9')
      IMINUS = ICHAR('-')
      IPLUS = ICHAR('+')
      IDOT = ICHAR('.')
      IEEE = ICHAR('E')
      ISMALE = ICHAR('e')
      ERROR=.FALSE.
      LLEN = LEN(A)
* FIND THE START OF THE NUMBER FIELD
      DO 10 I = ISTART, LLEN
         N = ICHAR( A(I:I) )
         IF ( N.GE.IZERO .AND. N.LE.ININE) GOTO 20
         IF ( N.EQ.IMINUS) GOTO 20
         IF ( N.EQ.IDOT) GOTO 20
 10   CONTINUE
      ERROR = .TRUE.
      READA = 0.0D0
      RETURN
 20   CONTINUE
* START FOUND, NOW FIND END
      EXPON = .FALSE.
      DO 30 J = I+1, LLEN
         N = ICHAR( A( J: J) )
         IF ( N.GE.IZERO .AND. N.LE.ININE) GOTO 30
         IF ( N.EQ.IMINUS) THEN
            IF (EXPON) GOTO 30
            GOTO 40
         ENDIF
         IF ( N.EQ.IPLUS) THEN
            IF (EXPON) GOTO 30
            GOTO 40
         ENDIF
         IF ( N.EQ.IDOT) THEN
            IF (EXPON) GOTO 40
            GOTO 30
         ENDIF
         IF ( N.EQ.IEEE) THEN
            EXPON = .TRUE.
            GOTO 30
         ENDIF
         IF ( N.EQ.ISMALE) GOTO 30
         GOTO 40
 30   CONTINUE
      J = J + 1
 40   CONTINUE
* FOUND END OF FIELD, IT RUNS 'I' THRU 'J-1'
      J = J -1
* NOW USE FORTRAN INTERNAL READ TO CONVERT
c**      READ( A( I: J), '(F<J-I+1>.0)', ERR=90) ETEMP
      ITEMP = J-I+1
      IF( ITEMP.LT.10) THEN
        WRITE( DUMMY, '( ''(F'',I1,''.0)'')') ITEMP
      ELSEIF( ITEMP.GT.9) THEN
        WRITE( DUMMY, '( ''(F'',I2,''.0)'')') ITEMP
      ENDIF
      READ( A( I: J), DUMMY, ERR=90) ETEMP
      READA = ETEMP
      ERROR = .FALSE.
      RETURN
* ERROR FROM INTERNAL READ
 90   CONTINUE
      ERROR = .TRUE.
      READA = 0.0D0
      RETURN
      END
