HP Pascal/iX Programmer's Guide (31502-90023)
5-: 12
The array uba takes three bytes:
The array pba takes three bits:
If an array is not within a crunched structure, the compiler aligns the
entire array on the same boundary as its first element, or on a byte
boundary.
Declaring an array PACKED has no effect on its elements if the elements
are unpacked structures.
Packed Records
Table 5-4 shows how the HP Pascal packing algorithm allocates and
aligns the fields of a packed record. The field types are in
alphabetical order.
Table 5-4. Allocation and Alignment of Packed Record Fields
(HP Pascal Packing Algorithm)
-----------------------------------------------------------------------------------------------
| | | |
| Field Type | Allocation | Field Alignment |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Anyptr | 8 bytes | 4-byte |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Array, crunched | Minimum number of bits required to represent any | Bit |
| | value of the element type. | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Array, packed | Use formula in "Arrays" section and then pad to | Same as element |
| | alignment boundary. | or byte, |
| | | whichever is |
| | | larger. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Array, unpacked | Use formula in "Arrays" section and then pad to | Same as element. |
| | alignment boundary. | |
| | | |
-----------------------------------------------------------------------------------------------