HP Pascal/iX Reference Manual (31502-90022)

10- 9
.
lastpos
Usage
lastpos
(f)
Parameter
f
A variable of type file opened in the direct access state.
f
must
be specified.
Description
The function lastpos(
f)
returns the integer index of the last component
of
f
that has been accessed while the program has been running, or in the
life of the file. It is an error if
f
is not opened as a direct access
file.
Example
i:=lastpos(file_var) { File_var is the name of a file type variable }
linepos
Usage
linepos
(f)
Parameter
f
A textfile variable that must be opened.
f
may not be omitted. The
program must specify the standard files
input
and
output
by name.
Description
The function linepos(
f)
returns the integer number of characters read
from or written to the textfile
f
since the last end-of-line marker.
This does not include the character in the buffer variable
f
^. The
result is zero after reading a line marker, or immediately after a call
to readln, writeln, prompt, or overprint.
Example
i:=linepos(text_file)
maxpos
Usage
maxpos
(f)