From Clomosy Docs

`WriteLn` is used to add a line to a file. The function appends a line of text to the specified file and automatically moves to the next line.

Example

var
  myFile: TextFile;
  fileName: string;

{
  fileName = 'example.txt';

  // Open the file
  AssignFile(myFile, fileName);
  Rewrite(myFile); // Open the file in write mode

  // Write a line to the file
  WriteLn(myFile, 'Hello, this is a write example.');

  // Close the file
  CloseFile(myFile);
}

See Also