HP Pascal/iX Programmer's Guide (31502-90023)
A-: 8
physical file currently associated with a given logical file. You can
use this file number in calls to MPE/iX file system intrinsics.
Syntax
fnum (
filename
)
Parameter
filename
The name of the logical file. This parameter is required,
even if the logical file is the standard file
input
or
output
. The logical file must be associated with a
physical file.
Example
PROGRAM aaa (output,f);
VAR
f : text;
file_number : integer;
file_name : PACKED ARRAY [1..86] OF char;
PROCEDURE fgetinfo; INTRINSIC;
BEGIN
reset(f);
file_number := fnum(f);
file_name := ' ';
fgetinfo(file_number,file_name);
writeln('File name of f is', file_name);
END.
Get_alignment Function
The predefined function
get_alignment
returns the alignment requirement
of a given type or variable. For a type,
get_alignment
returns the
minimum possible alignment. For a variable, it returns the actual
alignment.
Syntax
get_alignment ({variable})
{type }
Parameters
variable
Any variable. The function
get_alignment
returns its
alignment requirement.
type
Any type identifier (the name of any type). The function
get_alignment
returns its alignment requirement.
Example
$OS 'MPE XL'$
PROGRAM prog;
TYPE
Rec = $ALIGNMENT 8$
RECORD
f1 : integer;
f2 : shortint;
f3 : real;
END;
integer_ = $ALIGNMENT 2$ integer;
VAR