[comp.lang.pascal] READING/WRITING TO TURBO FILES

NUZENITH@NDSUVM1.BITNET (John R. Holand) (03/06/88)

CAN ANYONE TELL ME HOW ONE CAN
read/write to a file  without doing a reset/rewrite to the file ( ie:
so i can just edit/insert/append to file) I am using record files in particular
 ie
 type
   rec_type = record
                name : string [20] ;
                age  : integer ;
              end
  var
   data_file : file of rec_type

thank you
John R. Holand

jc58+@andrew.cmu.EDU (Johnny J. Chin) (03/06/88)

John:

     If you maintain records in the data file, you could simply reset the file,
seek to the position in the file do the read or the write you want.  Be careful
when you write.  Make sure that you are on the proper record.  I usually append
records at the end (seek to the end and then do the write).

     I hope bit of information can lead you in the write direction.

     Happy computing ...
                                                -- John

+--------------------------------------------------------------------------+
| Johnny J. Chin                                Carnegie Mellon University |
+----------------------------------+---------------------------------------+
| US Mail: Johnny J. Chin          | ARPAnet: Johnny.J.Chin@andrew.cmu.edu |
|          4730 Centre Avenue #412 | BITnet:  jc58%andrew@cmccvb.BITNET    |
|          Pittsburgh, PA  15213   | UUCP:    harvard!andrew.cmu.edu!jc58  |
+----------------------------------+---------------------------------------+
| Disclaimer:   The views expressed herein are STRICTLY my own.            |
+--------------------------------------------------------------------------+