      integer function fortread()

      implicit none

c*** read an event
      CALL kzeclr
      CALL SKREAD(10,*1002,*1001,*10,*10)
      print *,'=====read normal'
      fortread = 0
      goto 999

c*** read again?
 10   continue
      fortread = -1
      print *,'=====read again?'
      goto 999

c*** eof?
 1001 continue
      call skclosef(10)
      fortread = 1
      print *,'=====no read, eof'
      goto 999

 1002 continue
      print *,'=====read error'
      fortread = 2
      goto 999

 999  continue

      return
      end
