Node: Reset, Next: resident, Previous: repeat, Up: Reference

### Reset

(Under construction.)

#### Synopsis

         procedure Reset (var F: any_file; [FileName: String;]
                                             [BlockSize: Cardinal]);

#### Description

`Reset` opens an existing file for reading. The file pointer is positioned at the beginning of the file.

Like `Rewrite`, `Append` and `Extend` do, `Reset` accepts an optional second parameter for the name of the file in the filesystem and a third parameter for the block size of the file. The third parameter is allowed only (and by default also required) for untyped files. For details, see Rewrite.

#### Conforming to

`Reset` is defined in ISO 7185 Pascal. The `BlockSize` parameter is a Borland Pascal extension. The `FileName` parameter is a GNU Pascal extension.

#### Example

         program ResetDemo;
         var
           Sample: Text;
           s: String (42);
         begin
           Rewrite (Sample);  { Open an internal file for writing }
           WriteLn (Sample, 'Hello, World!');
           Reset (Sample);  { Open it again for reading }
           ReadLn (Sample, s);
           WriteLn (s);
           Close (Sample)
         end.

#### See also

Assign, Rewrite, Append, Extend.