RosettaCodeData/Task/File-input-output/HicEst/file-input-output-2.hicest

8 lines
371 B
Text
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
OPEN(FIle=input, OLD, ERror=21) ! on error branch to label 21 (not shown)
OPEN(FIle=output)
DO i = 1, 1E300 ! "infinite" loop, exited on end-of-file error
READ( FIle=input, ERror=22) buffer ! on error (end of file) branch to label 22
WRITE(FIle=output, ERror=23) buffer ! on error branch to label 23 (not shown)
ENDDO
22 WRITE(FIle=output, CLoSe=1)