Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!apple!bbn!drilex!dricejb From: dricejb@drilex.UUCP (Craig Jackson drilex1) Newsgroups: comp.lang.fortran Subject: Re: Position in file after open? Message-ID: <5443@drilex.UUCP> Date: 16 Oct 89 12:47:07 GMT References: <1162@atha.AthabascaU.CA> <1989Oct14.233757.8471@esegue.segue.boston.ma.us> Reply-To: dricejb@drilex.UUCP (Craig Jackson drilex1) Organization: DRI/McGraw-Hill, Lexington, MA Lines: 39 In article <1989Oct14.233757.8471@esegue.segue.boston.ma.us> johnl@esegue.segue.boston.ma.us (John R. Levine) writes: >In article <1162@atha.AthabascaU.CA> lyndon@cs.AthabascaU.CA (Lyndon Nerenberg) writes: >>Can someone enlighten me as to what the ANSI F77 spec has to say >>about where a file pointer sits immediately after an open? > >It doesn't say anything (and I just reread the section on OPEN for the >zillionth time, just to be sure.) A standard conforming processor could >position the file at the beginning, at the end, or at the 17th record. It >could pick a different position every time. If you think this is stupid, >then you understand the essence of F77 file processing. I believe that the standard is silent on this point so that things like JCL's DISP=MOD are allowed to have their correct semantics. In JCL, if you say DISP=NEW on an output file, a new file is created. If you say DISP=MOD, an old file is appended to. All of this happens outside the actual Fortran program. These things are useful in a batch environment if you don't want a lot of file positioning code in your application. >My impression is that there was a lot of arguing in the F77 committee >among vendors with real file systems, vendors with no file systems, and >vendors like IBM which were somewhere in between. They ended up with a >compromise that is full of features that are so vague as to be useless. >I hope F8x is better, I await my copy of the standard eagerly. I think that F8x does address this subject somewhat better, but I think that there are still provisions which allow external positioning for the batch people. >-- >John R. Levine, Segue Software, POB 349, Cambridge MA 02238, +1 617 864 9650 >johnl@esegue.segue.boston.ma.us, {ima|lotus|spdcc}!esegue!johnl -- Craig Jackson dricejb@drilex.dri.mgh.com {bbn,ll-xn,axiom,redsox,atexnet,ka3ovk}!drilex!{dricej,dricejb}