HP Pascal/HP-UX Release Notes Version A.10.08

Chapter 1 43
New and Changed Features
Porting HP Pascal/HP-UX Programs
Porting HP Pascal/HP-UX Programs
If you plan to run your programs only on HP computers, the effort to port
your programs between HP computers is minimal and the extra features
that HP Pascal/HP-UX provides will make your programming much
easier. However, if you plan to port your programs to another vendor's
computer, the effort to do so will be proportional to your use of
nonstandard HP Pascal/HP-UX extensions. Even if the system you are
porting to has extensions, it is doubtful that the extensions on that
system have the same form as extensions on HP Pascal/HP-UX.
To determine which features are nonstandard in an HP Pascal/HP-UX
source file, include the $ANSI ON$ compiler option at the start of your
source file or use the -A command-line option.
When you compile the source file using the -L command-line option, the
compiler generates a listing file that shows where nonstandard features
are used. Combined, the ANSI compiler option and the -L command-line
option assure you that you are using only ANSI Standard Pascal features
or that you are aware of where you are using nonstandard features.
Porting Between Series 300/400 and Series
700/800
This section summarizes some of the HP Pascal/HP-UX language
features, both standard and nonstandard, that may cause problems
when porting Pascal programs between Series 300/400 and Series
700/800 as well as to or from other systems.
Data Type Sizes and Alignments
Table 1-6 shows the sizes and alignments of the Pascal data types on
HP-UX architectures. Packing significantly affects data type alignments
and sizes. For more specific information, refer to HP Pascal/HP-UX
Reference Manual; and HP Pascal/HP-UX Programmer's Guide.
On the Series 300/400, if the +A command-line option is specified, any
data types larger than two bytes are aligned on a 2-byte boundary.