fpc/docs/refex/ex3.pp
1998-03-25 11:26:49 +00:00

17 lines
455 B
ObjectPascal

Program Example3;
{ Program to demonstrate the Append function. }
Var f : text;
begin
Assign (f,'test.txt');
Rewrite (f); { file is opened for write, and emptied }
Writeln (F,'This is the first line of text.txt');
close (f);
Append(f); { file is opened for write, but NOT emptied.
any text written to it is appended.}
Writeln (f,'This is the second line of text.txt');
close (f);
end.