HP 3000 Manuals

System Dependent Features [ HP Pascal/iX Programmer's Guide ] MPE/iX 5.0 Documentation


HP Pascal/iX Programmer's Guide

System Dependent Features 

System dependent features are available to all HP Pascal programs
(regardless of the system on which the compiler is running), but the
system affects their definitions and behavior.  System dependent HP
Pascal features fall into these categories:

   *   Compiler options.

   *   File names.

   *   Input/output.

   *   Miscellaneous.

Compiler Options 

The following compiler options are available to programs compiled by the
HP Pascal compiler running on either the HP-UX or MPE/iX operating
system, but they work differently on the two systems.

     INCLUDE
     SYMDEBUG

See the HP Pascal/HP-UX Reference Manual for more information on these
compiler options.

File Names 

Syntax 

     [/][pathname]... {identifier}

Parameter 

pathname              Refer to the HP-UX Reference for syntax of
                      pathname.

identifier            The name of the main source file must end with
                      ".p".  Included files need not end with ".p".

Example 

     x.p
     Pascal/tsource/tabort.p
     /mnt/shankar/junk/t.p

For more information on HP-UX file names, refer to the HP-UX Reference 
manual.


NOTE The HP-UX operating system is case-sensitive. HP Pascal is not case-sensitive, except within string literals (such as "HP Pascal") and when you open a file without explicitly associating it with a physical file (that is, when you do not specify the second parameter to open or reset). In the latter case, the file name (identifier) is upshifted. The HP-UX operating system may not recognize the file by this new name. To avoid this problem, use all-capital names in the operating system environment for files that HP Pascal programs will use (for example, name an external file FILE1, not File1).
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: setenv PASXDATA n or the command: PASXDATA=n export PASXDATA Maxpos The call maxpos(f) returns maxint, regardless of f. Open options The third parameter of the predefined file-opening procedures append, associate, open, read, reset, rewrite, and write. It is optional for all but associate, for which it must have one of the values listed in "Associate Procedure" . Ord At the STANDARD_LEVEL 'EXT_MODCAL' ord allows short pointers as arguments. Output The standard program parameter and textfile output is stdout. Stderr The standard program parameter and textfile stderr is the HP-UX file stderr. System intrinsic file ../../sys/pub/sysintr System default module /usr/lib/paslib library Temporary files If the environment variable TMPDIR is defined (as a path to a directory to hold temporary files), temporary files are placed in that directory; otherwise, temporary files are created in the directory /usr/tmp. (See the standard HP-UX entry point tempdir(2).) Write If the file being written is a terminal, the output is unbuffered. This means that write to a terminal has the same behavior as prompt.


MPE/iX 5.0 Documentation