Previous: Addr function To the Table of Content Next: ArcTan function

- 4.62.2.3 -
Standard Units
System Unit
System Unit Procedures and Functions

Append procedure

Targets: MS-DOS, Win32

System Unit

Opens an existing file for appending.

Declaration:
procedure Append(var F: Text);
Append works only if the file exists. It sets the file pointer to the end of the file. If F is open when Append is called then F is first closed and then reopened. If one assigns an empty file name to F, output will be directed to the standard output file. Errors are returned through IOResult if {$I-}.

If there are no errors then IOResult returns zero.

Example:
{$ifndef __CON__}
  This program must be compiled as console application only
{$endif}
var
  Fi:Text;
begin
  Assign(Fi, 'THE_FILE.TXT');
  Append(Fi);
  WriteLn(Fi, 'Just testing Append.');
  Close(Fi);
end.
See also:
{$I} - I/O Checking Switch


Previous: Addr function To the Table of Content Next: ArcTan function
Addr function Table of Content ArcTan function

- 4.62.2.3 -