HP Pascal/iX Programmer's Guide (31502-90023)
B- 5
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
PROGRAM prog;
TYPE
Rec = $ALIGNMENT 8$
RECORD
f1 : integer;
f2 : shortint;
f3 : real;
END;
integer_ = $ALIGNMENT 2$ integer;
VAR
ptr : ^integer_;
BEGIN
i := get_alignment(rec);
IF get_alignment(ptr^) <> 2 THEN
.
.
.
END.
Statement_number Function
The predefined function
statement_number
returns the statement number of
the statement that calls it, as shown on the compiled listing. It is a
useful debugging aid, especially when used with the predefined procedure
assert
.
Syntax
statement_number
Example
PROGRAM prog (output);
VAR
i : integer;
BEGIN
i := statement_number;
writeln('Current Statement Number is ', i);
assert(a > b, statement_number);
END.
Compiling, Linking, and Running Your Program
To make your HP Pascal program a valid HP-UX process, you must compile,
link (and load), and run it.
The HP-UX command
pc
coordinates the HP Pascal compiler
(/usr/lib/pascomp) and the HP-UX linker loader (/bin/ld).
The name of the file containing your source program must end with .p (for
example, prog.p). The extension .p causes the pc command to call the HP