The rewrite procedure
The rewrite procedure associates a file variable
with a file (i.e. opens the file variable and allows it to
be used to manipulate the file). The rewrite procedure opens the file variable in
The open procedure can also be used to open
file variables in write-only mode.
The name of the file variable, referenced by the first parmater,
controls which file is opened by the rewrite procedure. If the name is a non-empty
string then a file with that name is opened. If the name is an empty string then the file
opened is either the standard output file, or a temporary file (with a system generated name),
depending on the project options set when the program was compiled.
- The first parameter is a reference to the file variable
- The second parameter is an expression of
string type or char type,
and names the file variable, referenced by the
first parameter, as if the built-in procedure assign
had been called. NOTE: This parameter is an
extension to Standard Pascal.
File variables can get named in the
Operating Systems: All
Standard Pascal: Yes