Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!decwrl!sun-barr!newstop!exodus!exodus-bb!khb From: khb@chiba.Eng.Sun.COM (Keith Bierman fpgroup) Newsgroups: comp.lang.fortran Subject: Re: writing to nonempty file Message-ID: Date: 4 Feb 91 22:19:31 GMT References: Sender: news@exodus.Eng.Sun.COM Organization: Sun MegaSystems Lines: 18 In-reply-to: ignacij@orion's message of 4 Feb 91 20:18:30 GMT In article ignacij@orion (Ignacy Misztal) writes: In most compilers that I use, opening and writing to an existing file results in overwriting the old contents. Not so in the IBM RS/6000, where records are appended at the end of the file. Everything is normal when one rewinds the file right after the open statement. Which is the correct semantics in view of standard Fortran 77? Alas both behaviors are perfectly legal. This was done to accomodate existing practice which differed from system to system. In Fortran90 this is resolved, there is an explicit APPEND mode. -- ---------------------------------------------------------------- Keith H. Bierman kbierman@Eng.Sun.COM | khb@chiba.Eng.Sun.COM SMI 2550 Garcia 12-33 | (415 336 2648) Mountain View, CA 94043