Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!udel!princeton!jonlab!jon From: jon@jonlab.UUCP (Jon H. LaBadie) Newsgroups: comp.lang.c Subject: Re: problem with fread/fwrite Summary: A clarification please Keywords: fread, fwrite, file pointers Message-ID: <880@jonlab.UUCP> Date: 16 Nov 90 07:14:41 GMT References: <402@bally.Bally.COM> <14384@smoke.brl.mil> <13992@ulysses.att.com> <3337@bruce.cs.monash.OZ.AU> Organization: 4455 Province Line Rd., Princeton, NJ 08540 Lines: 24 Despite all the discussion on this topic, I do not see the need for the programmer to indicate a switch from reading to writing and visa versa. I mean I know it is needed, but I do not understand why. If in the stdio buffer I have the following; Mary had a big sheep. Supercalifragalisticexpalidocious ... ^ With my pointer (read in this case) on the 'M', after I fread 23 bytes, so my buffer and pointer are such: Mary had a big sheep. Supercalifragalisticexpalidocious ... ^ what is wrong with fwrite'ing "Jack and Jill" on top of Super...? I.e. what is critical returning to some ground zero state before making a transition? Jon -- Jon LaBadie {att, princeton, bcr, attmail!auxnj}!jonlab!jon