home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l210 / 1.ddi / REFEXAMP.ARC / OPENMOD2.PRO < prev    next >
Encoding:
Text File  |  1988-06-21  |  522 b   |  16 lines

  1. %====================== openmodify/2          ===============================
  2. DOMAINS
  3.   file = myfile
  4.  
  5. GOAL  file_str("dd.txt", "Create file with\nonly two lines\n"),
  6.       openmodify(myfile, "dd.txt"),
  7.       readdevice(myfile),
  8.       readln(L),
  9.       filepos(myfile,FilePos,0),
  10.       writedevice(myfile),      % Moves filepointer to the end
  11.       filepos(myfile,FilePos,0),
  12.       write("This will overwrite the second line\n"),
  13.       closefile(myfile),
  14.       file_str("dd.txt", STR1),
  15.       display(Str1).
  16.