HP Pascal/iX Reference Manual (31502-90022)

10- 4
I/O Standard Procedures and Functions
append
Usage
append
(f)
append
(f, s)
append
(f, s, t)
Parameters
f
A variable of type file. The parameter
f
may not be omitted.
s
The name of a physical file associated with f. This can be a string
or PAC expression whose range is implementation defined.
t
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. This parameter specifies carriage control and file
access.
Description
The procedure append
(f)
opens file
f
in the output state, and places the
current position immediately after the last component. All previous
contents of
f
remain unchanged. The eof
(f)
function returns true, and
the file buffer
f^
is undefined. Data may now be written on
f
.
If
f
is already open, append closes and then reopens it. If a file name
is specified, the system closes any physical file previously associated
with
f
.
When
f
does not appear as a program parameter and
s
is not specified, the
system maintains any previous association of a physical file with
f
. If
there is no such association, it opens a temporary nameless file. This
file cannot be saved. It becomes inaccessible after the process
terminates or the physical-to-logical file association changes. For more
information, see the
HP Pascal/iX Programmer's Guide
or the
HP
Pascal/HP-UX Programmer's Guide
, depending on your implementation.
Example
append(file_var)
append(file_var,phy_file_spec)
append(file_var,phy_file_spec,opt_str)
append(fvar,'SHORTFIL')
Illustration
Suppose examp_file is a closed logical file of
char
containing three
components. In order to open it and write additional material without
disturbing its contents,
append
is called.