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

5-: 1
Chapter 5 Allocation and Alignment
This chapter:
* Defines
allocation, alignment,
and
packing algorithm
.
* Shows how unpacked and packed variables are allocated and aligned.
* Tells how entire arrays and records are allocated and aligned
(whether they are unpacked, packed, or crunched).
* Shows how array elements and record fields are allocated and
aligned when they are unpacked, packed, and crunched.
* Explains how enumeration and subrange types are related and shows
how they are allocated and aligned.
* Explains how files, sets, and strings are allocated and aligned.
NOTE This chapter applies to the HP Pascal packing algorithm, which is
the default. On the MPE/iX operating system, the compiler option
HP3000_16 specifies the Pascal/V packing algorithm instead. For
information on the HP3000_16 compiler option, refer to the
HP
Pascal/iX Reference Manual
. For information on the Pascal/V
packing algorithm, see Appendix A in this manual.
In diagrams in this section, bold lines are byte boundaries and fine
lines are bit boundaries. Unused bits and bytes are shaded.
Example
Note that:
* Zero represents the Boolean value FALSE, and one represents TRUE.
* The leftmost bit represents the sign of a signed integer value.
Byte boundaries are broken where a variable crosses them. Bit boundaries
are omitted where a variable crosses them. A space that is allocated to