Path: utzoo!utgpu!watserv1!ria!uwovax!chet From: chet@uwovax.uwo.ca Newsgroups: comp.lang.c Subject: Re: Append mode ("a") query Message-ID: <4992.25d9633c@uwovax.uwo.ca> Date: 14 Feb 90 18:55:08 GMT Lines: 30 In message 14089 I noted a problem with the "a" mode. This is to confirm that the C compiler on the Unix OS I use (Sun 4.0.1_Export) behaves the same way. A (stupid) way around the problem is to open the file with "r+" and then read to EOF before executing the fprintf() statement: (to be inserted into program B:) while (!feof(fp)) fgets(dump, 240, fp); If this is done, with the Sun C compiler and with Turbo C (but not with Small C 2.2), then the EOF mark will be in the proper place. My questions with respect the different behaviour of A and B still remain as puzzles. Note also that the first reply to the query involved a misinterpretation of the code and is not relevant. Thanks again for any help. Appended below is a bit of lex3.db to show what B does: mtu$n.$person$watu$human$ kitu$n.$thing$vitu$entity$ ona$v.$see, look at$psv. onekana$perception$ mtoto$n.$child$watoto$human$ msichana$n.$girl$wasichana$human$ kijana$n.$youth$vijana$human$ chui$n.$leopard, cheetah$chui$animal$ Chet Creider creider@csd.uwo.ca