title: How to append text to a file without erasing its previous content
body: <p>How do I make Delphi write to a text file without erasing the file's previous contents?
  I already know how to add text but as soon as I try adding more it just replaces the previous text that was already in the file.</p>
  
  <p>I have already tried changing the <code>Rewrite</code> command to <code>Write</code>.</p>
  
  <pre><code>procedure TForm1.BtnokClick(Sender: TObject); 
  var 
      myfile :textfile;
      naam, van, adress : string;
  begin 
       adress := edtadress.Text;
       van:= edtvan.Text;
       naam := edtnaam.Text; 
       AssignFile(myfile,'C:\test.txt');
       write(myfile);
       Writeln(myfile,naam);
       writeln(myfile,van);
       writeln(myfile,adress);
       closefile(myfile);
  end;
  </code></pre>