- 4.67.2.70. -
Table of Contents
4. Standard Units
4.67. System - Built-in routines
4.67.2. System Unit Procedures and Functions
4.67.2.70. Reset procedure
4.67.2.70. 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
- 4.67.2.70. -