1: integer getc, putc, fgetc, fputc, oer 2: character c 3: open(1,status='s') 4: write(*,*) "Go" 5: 10 ier = getc(c) 6: if (ier .eq. 0) then 7: oer = fputc(1,c) 8: goto 10 9: else 10: call perror("end of getc/fputc test") 11: write(*,*) "ier=", ier, "oer=", oer 12: endif 13: 14: rewind 1 15: write(*,*) "Go" 16: 20 ier = fgetc(1, c) 17: if (ier .eq. 0) then 18: oer = putc(c) 19: goto 20 20: else 21: call perror("end of fgetc/putc test") 22: write(*,*) "ier=", ier, "oer=", oer 23: endif 24: end