C  THIS PROGRAM ILLUSTRATES THE USE OF THE ERR =
C  FORTRAN HAD A RUDIMENTARY FORM OF ERROR HANDLING
      INTEGER S(5)
      WRITE (6,35)
35    FORMAT (1X, ' PLEASE ENTER AN INTEGER  ')
C     READ LINE OF TEXT
      READ (5,36,ERR = 29) S
36    FORMAT (I5)
C     PRINT LINE OF TEXT
      WRITE (6,37) S
37    FORMAT (1X,I6)
      GOTO 40
29    WRITE (6, 20)
20    FORMAT (1X, ' HAD AN ERROR IN THE INPUT DATA ')
40    STOP
      END

