HP Pascal/iX Programmer's Guide (31502-90023)

3-: 9
| Where it Puts Current Position Index | Before first component. |
| | |
---------------------------------------------------------------------------------------------
| | |
| Value of
eof
for File * | False unless opened for write, in which |
| | case
eof
returns true despite possible old |
| | data after the current component. |
| | |
---------------------------------------------------------------------------------------------
| | |
| Erases Old file Contents | No. |
| | |
---------------------------------------------------------------------------------------------
| | |
| File Buffer Variables * | First component for a textfile that is open |
| | for reading; undefined otherwise. |
| | |
---------------------------------------------------------------------------------------------
* For a nonempty file. For an empty file, every file-opening
procedure puts the current position index before the [nonexistent]
first component,
eof
returns
true
, and the file buffer variable is
undefined.
If the physical file is not empty, the first reference to its file buffer
variable loads its file buffer with its first component. If the physical
file is empty, the first reference to its file buffer variable causes an
error.
Figure 3-4 illustrates the effect of the
associate
procedure on the
open file whose file number is
file_num
:
Condition of file:
After
associate(examp_file,file_num,'READ')
, the file is open in the
read-only state and looks like this:
Now
examp_file
is open in the read-only state.
Figure 3-4. Effect of Associate Procedure on Open File