Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Packing Structures (/Zp)
◄Up► ◄Contents► ◄Index► ◄Back►
─────Packing Structures (/Zp)───────────────────────────────────────────────
The /Zp option controls the packing of variables in structures.
Syntax: /Zp[{1 | 2 | 4}]
A tight pack saves memory space, at the expense of slightly slower
access for noncharacter variables.
By default, structures are packed according to the following
rules: INTEGER*1, LOGICAL*1, and CHARACTER variables begin at the
next available byte; all other variables begin at the next even
byte.
/Zp1 forces all variables to begin at the next available byte,
whether odd or even.
/Zp2 is the default packing.
/Zp4 forces INTEGER*1, LOGICAL*1, and CHARACTER variables to begin
at the next available byte, whether odd or even. All other
variables start on the next four-byte boundary.
See Also: ◄$PACK►
-♦-