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

A-: 5
Example
MODULE mymod;
IMPORT
stdinput, stdoutput;
EXPORT
FUNCTION myproc : integer;
IMPLEMENT
FUNCTION myproc : integer;
VAR
i : integer;
BEGIN
prompt('enter number:'); {need not specify output file}
readln(i); {need not specify input file}
myproc := i;
END;
END.
Additional Features
The HP Pascal features in the left-hand column depend on the MPE/iX
operating system in the ways explained in the right hand column.
Feature MPE/iX Dependency
Close options The optional third parameter of the
predefined procedure
close
can be SAVE,
LOCK, TEMP, NORMAL, CRUNCH, or PURGE, whose
meanings are:
SAVE LOCK The file is saved as a
permanent file after it is
closed.
TEMP NORMAL The file is saved as a
temporary file after it is
closed.
CRUNCH Space after end-of-file marker
is removed when the file is
closed.
PURGE The file is purged after it is
closed.
Halt MPE/iX calls the intrinsic QUIT with an
integer parameter.
Internal table size
The Job Control Word (JCW) PASXDATA is the
number of pages to allocate to each internal
table (there is one internal table for
identifiers and another for structured
constants). The default internal table size
is 100 pages. To set the internal table
size to
n
pages, use the command:
:SETJCW PASXDATA
n
Write If the file being written is $STDLIST (the
default output file), the output is
unbuffered; therefore, a
write
to $STDLIST
has the same behavior as
prompt
.
Input The standard program parameter and textfile
input
is $STDIN.
Maxpos The call
maxpos(f)
returns the position
number of the last component of the file
f
that the program can access. It is an error
if the file
f
is not open for direct access.
Open options The third parameter of the predefined