Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!crdgw1!crdos1!davidsen From: davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) Newsgroups: comp.unix.questions Subject: Re: fopen ( ..., "a" ) --- how does the "a" work? Message-ID: <1890@crdos1.crd.ge.COM> Date: 7 Dec 89 18:45:21 GMT References: <3250@hub.UUCP> <895@hsi86.hsi.UUCP> <21152@mimsy.umd.edu> Organization: GE Corp R&D Center, Schenectady NY Lines: 18 Reply-exos:@crdgw1:To: davidsen@crdos1.crd.ge.com (bill davidsen) In retrospect I think that one more key letter would have been useful in pANS. The use of "a" to mean 'always append, never rewrite' is a useful one, but often "a" is used when what is meant is to 'open the existing file if there is one, otherwise create one.' If "a" really means append only, then the second use requires: open for "r" if that fails open for "w+" This is not a big deal, but either another open type in addition to {rwa} could have been provided, or another modifier in addition to {+b} would suffice. Something for the next committee to consider, I suspect. -- bill davidsen (davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen) "The world is filled with fools. They blindly follow their so-called 'reason' in the face of the church and common sense. Any fool can see that the world is flat!" - anon