Reset opens the existing external file with the name assigned to F using the mode specified by the global FileMode variable. An error results if no existing external file of the given name exists or if the file can? be opened with the current file mode. If F is already open, it is first closed and then reopened. The current file position is set to the beginning of the file.
Warning: The default value of FileMode is 2 (Read/Write access). If this is not changed to a read-only file mode before calling Reset, attempts to open read-only files will fail.
F is a variable of any file type associated with an external file using AssignFile. RecSize is an optional expression, which can be specified only if F is an untyped file. If F is an untyped file, RecSize specifies the record size to be used in data transfers. If RecSize is omitted, a default record size of 128 bytes is assumed.
If F is assigned an empty name, such as AssignFile(F, ''), then after the call to Reset, F refers to the standard input file.
If F is a text file, F becomes read-only.
After a call to Reset, Eof(F) is True if the file is empty; otherwise, Eof(F) is False.
Note: {$I+} handles run-time errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.