forlang.hlp (Table of Contents; Topic list)
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.
$PACK
                                             Up Contents Index Back
─────$PACK──────────────────────────────────────────────────────────────────
 
     Action
 
     Controls the byte alignment of variables in structures.
 
     Syntax  $PACK[:{1 | 2 | 4}]
 
     Remarks
 
     Without $PACK, structures are packed according to the following
     default rules: INTEGER*1, LOGICAL*1, and CHARACTER variables
     begin at the next available byte, whether odd or even; all other
     variables begin at the next even byte. This arrangement requires
     more memory, but gives the quickest access to structure elements.
 
     $PACK:1 forces all variables begin at the next available byte.
 
     $PACK:2 follows the default rules.
 
     $PACK:4 aligns INTEGER*1, LOGICAL*1, and CHARACTER variables at
     the next available byte; all other variables begin on four-byte
     boundaries.
 
     $PACK without a colon or number reverts to whatever mode was
     specified in the command-line /Zp option.
 
     $PACK may appear anywhere in a program.
 
     See also: /Zp
 
     Example
 
     $PACK
     .
     .
     .
     $PACK:1
                                    -♦-