Path: utzoo!attcan!uunet!samsung!know!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!apple!amdahl!key!sjc From: sjc@key.COM (Steve Correll) Newsgroups: comp.lang.fortran Subject: Re: File handling in Fortran 77 Message-ID: <2153@key.COM> Date: 2 Oct 90 18:13:25 GMT References: <46016@masscomp.ccur.com> <1990Sep12.215551.16135@agate.berkeley.edu> <1990Oct1.174040.16208@ux1.cso.uiuc.edu> Organization: Key Computer Labs, Fremont, CA Lines: 27 In article <1990Oct1.174040.16208@ux1.cso.uiuc.edu>, hirchert@harriett.ncsa.uiuc.edu (Kurt Hirchert) writes: > In article <2144@key.COM> sjc@key.COM (Steve Correll) writes: > >Fortran 90 permits you to specify POSITION='REWIND', POSITION='APPEND', or > >POSITION='ASIS' in the OPEN statement. The latter leaves the file position > >unchanged if the file exists and was already connected. > > Steve's description of POSITION='ASIS' is not entire correct. ASIS provides > processor-dependent positioning. I.e., it provides what FORTRAN 77 provided > ... My description had better be correct, because the last ten words of it are copied directly from lines 31 and 32 of section 9.3.4.7 of the S8.115 draft standard! ASIS behaves as I described when the file was already connected, but behaves as Kurt described (i.e. processor-dependent, like Fortran 77) when the file was not connected. Kurt's case is admittedly the more common. What is my case for? You can use OPEN a second time on an already-connected file/unit pair so as to change the attributes BLANK=, PAD=, or DELIM=. When you do, the default is POSITION='ASIS', which is defined (mercifully enough) not to mess up the file position in the process. Rather than multiplexing two different meanings onto ASIS, it might be less confusing to have two different attributes ASIS and PROCESSORDEPENDENT, but it's probably good enough as is (sic). -- sjc@key.com or ...{sun,pyramid}!pacbell!key!sjc Steve Correll