Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!spool.mu.edu!uunet!comp.vuw.ac.nz!waikato.ac.nz!canterbury!phys169 From: phys169@csc.canterbury.ac.nz Newsgroups: comp.lang.pascal Subject: Re: soliciting advice (read/write mode in TP) Message-ID: <1991May29.115336.905@csc.canterbury.ac.nz> Date: 28 May 91 23:53:35 GMT References: <1991May28.215118.541@javelin.sim.es.com> Organization: University of Canterbury, Christchurch, New Zealand Lines: 20 In article <1991May28.215118.541@javelin.sim.es.com>, tpehrson@javelin.sim.es.com (Tim Clinkenpeel) writes: > is it possible to read and write a file at the same time or do i need to > open the file for read, find the record, save the file pointer position, > close the file, open the file for write, seek the pointer position and > write the record -OR- is there a method which i am unware of (efficiency > is what i seek). > Little Known Facts of Turbo Pascal #60103: When you use the "reset(somefile)" procedure in T.P., unless you put in a line before like "filemode:=64;" then it actually opens the file for reading AND WRITING. Some documentation suggests reset is for reading only, and rewrite for writing; ignore it. You don't even need to muck around with fmInOut, its done for you already. Warning to Remember about T.P. number R850: You can accidentally change data files you open with the reset procedure; it doesn't stop you from writing to them. Mark Aitchison, Physics, University of Canterbury, New Zealand. Trivia Question: what do the numbers 60103 (or 4472) and R850 have in common?