Open a text file to allow appending of text to the end System unit
 procedure Append ( var FileHandle : TextFile ) ;
The Append procedure opens a file given by FileHandle to allow subsequent writes to append to the end of the file.
You must use AssignFile to assign a file to the FileHandle before using Append.
This is often used when logging information - existing log data must be preserved, with the new log information appended to the end.
Use Write or WriteLn to write to the file after this Append is executed.
Related commands
AssignFile Assigns a file handle to a binary or text file
TextFile Declares a file type for storing lines of text
Write Write data to a binary or text file
WriteLn Write a complete line of data to a text file
Example code : Appending a line of text to an existing file
  myFile : TextFile;
  text   : string;

  // Try to open the Test.txt file for writing to
  AssignFile(myFile, 'Test.txt');

  // Write a couple of well known words to this file
  WriteLn(myFile, 'Hello');
  WriteLn(myFile, 'World');

  // Close the file

  // Reopen to append a final line to the file

  // Write this final line
  WriteLn(myFile, 'Final line added');

  // Close the file

  // Reopen the file for reading

  // Display the file contents
  while not Eof(myFile) do
    ReadLn(myFile, text);

  // Close the file for the last time
Show full unit code
   Final line added