[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
(Under construction.)
procedure Reset (var F: any file; [FileName: String;] [BlockSize: Cardinal]); |
`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.)
`Reset' is defined in ISO-7185 Pascal. The `BlockSize' parameter is a Borland Pascal extension. The `FileName' parameter is a GNU extension.
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. |
section 9.18 Assign, section 9.233 Rewrite, section 9.11 Append, section 9.81 Extend.