00001 character*80 foo 00002 open(42,file='foo') 00003 write(42,*)'Record 11111' 00004 write(42,*)'Record 22222' 00005 write(42,*)'Record 33333' 00006 write(42,*)'Record 44444' 00007 write(42,*)'Record 55555' 00008 rewind 42 00009 read(42,'(a)')foo 00010 write(42,*)'Record xxxxx' 00011 do i=1,100 00012 read(42,'(a)',err=999,end=999)foo 00013 end do 00014 999 end