[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.227 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 and third parameter for the name of the file in the filesystem and, for untyped files, the block size of the file. (For details, see section 9.233 Rewrite.)

Conforming to

`Reset' is defined in ISO-7185 Pascal. The `BlockSize' parameter is a Borland Pascal extension. The `FileName' parameter is a GNU 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

section 9.18 Assign, section 9.233 Rewrite, section 9.11 Append, section 9.81 Extend.



This document was generated by Frank Heckenbach on May, 10 2002 using texi2html