HP Pascal/iX Programmer's Guide (31502-90023)
B- 2
Standard Modules
Three standard modules are available on HP-UX:
stdinput
,
stdoutput
, and
stderr
.
If a module imports the
stdinput
module, it can use the predefined file
input
in I/O statements such as
read
and
readln
.
If a module imports the
stdoutput
module, it can use the predefined file
output
in I/O statements such as
write
and
writeln
.
If a module imports the
stderr
module, it can use the predefined file
stderr
in I/O statements such as
write
and
writeln
.
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 HP-UX
operating system in the ways explained in the right hand column.
Feature HP-UX 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 The file is saved as a permanent file
LOCK after it is closed.
TEMP
NORMAL
CRUNCH This option is ignored.
PURGE The file is purged after it is closed.
Halt HP-UX calls the system routine
exit(2)
with an
integer parameter.
Input The standard program parameter and textfile input
is
stdin
.
Internal table size
The environment variable 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: