Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!violet.berkeley.edu!jerry From: jerry@violet.berkeley.edu ( Jerry Berkman ) Newsgroups: comp.lang.fortran Subject: Re: Using END= and ERR= in READs Message-ID: <20692@agate.BERKELEY.EDU> Date: 22 Feb 89 02:53:24 GMT References: <436@orange19.qtp.ufl.edu> Sender: usenet@agate.BERKELEY.EDU Organization: University of California, Berkeley Lines: 26 In article <436@orange19.qtp.ufl.edu> bernhold@qtp.ufl.edu (David E. Bernholdt) writes: >I am writing code in which I want to trap I/O errors.... Logic tells me that >an end-of-file condition should be handled by an ERR= iff no END= is present. >The '77 standard tells me that "The set of input/output error >conditions is processor dependent." That seems to give someone the >leeway to *not* handle end-of-files with ERR= if no END= is present, >and (of course) I have a case in which this occurs (SunOS 3.4 f77). >Can anyone tell me if this "hole" was intentional, or an oversight? >If it was intentional, what is the logic? It seems rather inane to >have to put in "END=8800, ERR=8800" into every READ statement. There is no support in the standard for your "logic" that an end-of-file condition should cause a branch via the "ERR=" label if no "END=" is present. Sections 12.6 and 12.7 discuss error conditions and end-of-file conditions as distinct entities. A processor which takes the "ERR=" branch for an end-of-file condition would be non-standard. - Jerry Berkman U.C. Berkeley Computing Services jerry@violet.berkeley.edu