Append (procedure)

Language:
Русский
English

 Append (procedure)


Opens an existing file for appending.

Declaration

 procedure Append(var f: Text);

where:

 f is a text-file variable.

Target

Windows, Real, Protected

Remarks

F is a text file variable that must have been associated with an external file using Assign.

Append opens the existing external file with the name assigned to F. An error occurs if no external file of the given name exists. If F is already open, it is closed, then reopened. The current file position is set to the end of the file.

If a Ctrl+Z (ASCII 26) is present in the last 128-byte block of the file, the current file position is set to overwrite the first Ctrl+Z in the block. In this way, text can be appended to a file that terminates with a Ctrl+Z.

If F was assigned an empty name, such as Assign(F,''), then,after the call to Append, F refers to the standard output file (standard handle number 1).

After a call to Append, F becomes write-only, and the file pointer is at the end of the file.

With {$I-}, IOResult returns 0 if the operation was successful; otherwise, it returns a nonzero error code.

See Also

Sample Code

Тэги: Append
| G+
Код для вставки: :: :: :: ::
Поделиться: // //