Next: Moving to a Position
Up: Pascal File Operations
Previous: Associating a File variable
Contents
Once a file variable is associated with a particular filename, we can
open the file using one of the following procedures:
- reset. This procedure opens a file for reading. It
expects at least one parameters. The first parameter (mandatory)
is a file variable. The second parameter, if provided,
indicates the size of each record. Note that this procedure
always places the file pointer to the first byte in the file.
- rewrite. This procedure is similar to reset
in terms of expected parameters, but rewrite
opens a file for writing and
places the file pointer at the first byte. In FreePascal,
a reset can follow a rewrite so the file
can be both read from and written to.
- append. The procedure is similar to rewrite,
but it specifies that the program wants to write starting at the
end of the current file.
Tak Auyeung
2003-12-03