From Clomosy Docs

Revision as of 10:42, 23 October 2024 by ClomosyManager (talk | contribs) (Created page with "<div class="alert alert-ligth border border-3 border-primary-subtle rounded-5 p-4 shadow-sm" role="alert"> procedure ReWrite(var FileHandle TextFile); </div> Opening the file in write mode erases its content and prepares it to write new data.<br> The file created with AssignFile is opened with ReWrite using the file name specified in the directory where the Clomosy Learn application is located.<br> <div class="alert alert-danger" role="alert" data-bs-theme="light"> If...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Opening the file in write mode erases its content and prepares it to write new data.
The file created with AssignFile is opened with ReWrite using the file name specified in the directory where the Clomosy Learn application is located.

Example
TRObject Syntax

var
  file1 : TextFile;
{
  AssignFile(file1, 'Test.txt');
  ReWrite(file1);
}

Base Syntax

var
  file1 : TextFile;
begin
  AssignFile(file1, 'Test.txt');
  ReWrite(file1);
end;

See Also