Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.fortran Subject: Re: Using END= and ERR= in READs Message-ID: <9969@lanl.gov> Date: 2 Mar 89 22:15:42 GMT References: <448@orange19.qtp.ufl.edu> Organization: Los Alamos National Laboratory Lines: 25 From article <448@orange19.qtp.ufl.edu>, by bernhold@qtp.ufl.edu (David E. Bernholdt): > > Actually, VMS FORTRAN has nothing to do with it. Can you show me a > FORTRAN compiler that does NOT produce and ERROR message on an > end-of-file if it is not trapped? I haven't yet seen one. > From ANSI X3.9-1978 FORTRAN 77, Page 12-9, lines 22-25: ... if an end-of-file condition occurs during execution of a READ statement that contains neither an input/output status specifier nor an end-of-file specifier (12.7.2), execution of the executable program is terminated. This does not say anything about an error message. In fact, a Fortran environment which produces an error message in this case can be considered non-standard. Many programs may rely on this behaviour to correctly terminate when their input file is exhausted. In point of fact, most systems _do_ issue a message on this condition. It would be incorrect for the message to imply that the condition was an error. J. Giles Los Alamos