HP Pascal/iX Programmer's Guide (31502-90023)
A-: 3
If a logical file name is not a program parameter, but is the
first parameter of a file-opening procedure that has no second
parameter, the operating system associates the logical file with a
temporary, nameless physical file (assuming that the logical file
is not already associated with a physical file). You cannot save
the temporary file. When the program ends or the logical file is
associated with another physical file, the temporary file is
inaccessible.
2. The names of the logical and physical files are the first and
second parameters, respectively, of a predefined file-opening
procedure. It does not matter whether the logical file name is a
program parameter or not.
Example
PROGRAM case_two (input,output); {logical file name is not a
program parameter}
VAR
file1 : FILE OF integer;
BEGIN
rewrite(file1,'numfile');
.
.
.
END.
The operating system associates the logical file file1 with the
physical file numfile.
This association holds, even if the logical file name is a program
parameter.
Example
PROGRAM case_three (input,output,file1); {logical file name is a
program parameter}
VAR
file1 : FILE OF integer;
fname : PACKED ARRAY [1..8] OF char;
BEGIN
fname := 'numfile';
rewrite(file1,fname);
.
.
.
END.
The operating system still associates file1 with numfile, not
FILE1.
The second parameter of a file-opening procedure need not be a
string literal. It can also be a PAC variable or string
expression.
Using File Equations
The MPE/iX FILE command redirects the association of one physical file to
another physical file and specifies additional file attributes, which are
MPE/iX dependent.