Path: utzoo!utgpu!watmath!iuvax!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!uxe.cso.uiuc.edu!hirchert From: hirchert@uxe.cso.uiuc.edu Newsgroups: comp.lang.fortran Subject: Re: Position in file after open? Message-ID: <50500153@uxe.cso.uiuc.edu> Date: 20 Oct 89 15:12:00 GMT References: <1162@atha.AthabascaU.CA> Lines: 21 Nf-ID: #R:atha.AthabascaU.CA:1162:uxe.cso.uiuc.edu:50500153:000:1151 Nf-From: uxe.cso.uiuc.edu!hirchert Oct 20 10:12:00 1989 1. The FORTRAN 77 standard does not specify the position of a file after an OPEN. This was done intentionally in order to allow processors the freedom to support external prepositioning of files (e.g., the MOD disposition in IBM JCL which positions at the end of a file or the way many systems handle multi-file tapes). 2. It was the FORTRAN committee's intention that processors that did not support prepositioning would position at the beginning. However, one famous family of implementations positions files at the end. Depending on who you ask, the reason for this was a. to provide a useful alternative that could not be easily achieved otherwise b. to prove that there was a hole in the standard 3. The proposed Fortran 8x standard includes a keyword in the OPEN statement for specifying initial position. Contrary to what has been posted earlier, the default is 'ASIS', allowing Fortran 8x processors to behave consistently with their FORTRAN 77 predecessors. However, we can still hope that processors without prepositioning treat 'ASIS' as synonymous with 'REWIND' rather than 'APPEND'.