HP Pascal/iX Reference Manual (31502-90022)

10- 6
close
Usage
close
(f)
close
(f, t)
Parameters
f
A variable of type file.
f
may not be omitted.
t
Options string that may be a string or PAC expression whose value is
implementation dependent. Refer to the
HP Pascal/iX Programmer's
Guide
or the
HP Pascal/HP-UX Programmer's Guide
, depending on your
implementation, for more information.
Description
The procedure close(
f)
closes the file
f
so that it is no longer
accessible. After being closed, any references to the file
f
, except
through one of the file-open routines, results in an error, and
f
is not
associated with any physical file.
When closing a direct access file, the last component of the file is the
highest-indexed component ever written to the file (lastpos(
f)
). The
value of maxpos for the file, however, remains unchanged. Once a file is
closed, it may be reopened.
The options string specifies the disposition of any physical file
associated with the file. The value is implementation defined. The
compiler ignores leading and trailing blanks and considers upper and
lower case equivalent. If no options string is supplied, the file
retains its previous (original) status.
Example
close(fil_var)
close(fil_var,opt_str)
disassociate
Usage
disassociate
(f)
Parameter
f
A variable of type file.
Description
This procedure removes the logical-physical file association that was
previously created with the associate procedure. Consequently, the file
f
is no longer available to Pascal input and output routines.