Previous: Rename procedure To the Table of Content Next: ReWrite procedure

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

Reset procedure

Targets: MS-DOS, OS/2, Win32

System Unit

Opens an existing file.

Declaration:
procedure Reset(var  F [: File; RecSize: Longint ] );
Remarks:
F is a file variable of any type which was previously associated with a file name by a call to Assign. The external file must exist.

RecSize indicates the size in bytes of each record and can only be passed if F is an untyped file. Note that RecSize is not limited to 65,535 (64K) bytes.

If F is open when Reset is called, F is first closed and then reopened. If F is assigned to an empty string (‘’) then standard input is used. Text files are opened as read-only. A record size of 128 bytes is assumed if F is not a text file and RecSize is not passed.

Reset sets the file pointer to the top of the file. With {$I-}, IOResult returns an error code if an error occurred, otherwise it is set to zero.

See also:
{$I} - I/O Checking Switch


Previous: Rename procedure To the Table of Content Next: ReWrite procedure
Rename procedure Table of Content ReWrite procedure

- 4.62.2.70 -