Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!ncar!tank!uxc!uxc.cso.uiuc.edu!uxg.cso.uiuc.edu!uicsrd.csrd.uiuc.edu!davies From: davies@uicsrd.csrd.uiuc.edu Newsgroups: comp.lang.fortran Subject: Re: ERR= and END= Message-ID: <47900005@uicsrd.csrd.uiuc.edu> Date: 1 Mar 89 18:51:00 GMT References: <2291@unmvax.unm.edu> Lines: 8 Nf-ID: #R:unmvax.unm.edu:2291:uicsrd.csrd.uiuc.edu:47900005:000:454 Nf-From: uicsrd.csrd.uiuc.edu!davies Mar 1 12:51:00 1989 The standard leaves the values of iostat undefined, but it does require that the value returned is negative for end-of-file, zero if the read succeeds, and greater than zero if there was an error. You should be able to just test for zero to see if the read succeeded, if you don't care why it failed. (Of course, the original note was complaining that he had to give both err= and end=. Adding another statement to test the iostat can only be worse.)