xHarbour Reference Documentation > Statement Reference |
Defines the byte alignment for the next structure declaration.
pragma pack( [<nAlign>] )
xHarbour supports C structures with its typedef struct statement. Structure data is held in a contiguous block of memory which stores the values of all structure members. For efficient memory management, the values of structure members are aligned at an <nAlign> byte boundary. The default alignment is an 8 byte boundary.
Windows API structures
All structures used with 32-bit Windows API functions must be aligned on a 4 byte boundary. That is, pragma pack(4) must be called before typedef struct. Otherwise, structure data is not correctly processed.
See also: | C Structure class, (struct), typedef struct |
Category: | C Structure support , xHarbour extensions |
Header: | cstruct.ch |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
http://www.xHarbour.com