Data Definition Language (DDL) Reference Manual — 426798-002
H- 1
H
DDL Alignment Rules
This section provides information about alignment rules used by the DDL compiler
when generating C code.
The DDL compiler supports four types of alignment rules:
•
Default alignment rules for C00 and later versions of the C compiler. To use these
rules, specify the C00CALIGN compiler command.
•
Default alignment rules for versions of the C compiler prior to C00. To use these
rules, specify the NOC00CALIGN compiler command.
•
Default alignment rules for compatibility with pTAL or TAL structures. To use these
rules, specify the CMATCH_HISTORIC_TAL compiler command.
•
Default alignment rules for compatibility with C structures. To use these rules,
specify the FIELDALIGN_SHARED8 compiler command.
If you do not specify a set of alignment rules, the DDL compiler uses C00CALIGN as
the default.
The following subsections describe the three types of alignment rules.
C00CALIGN Alignment Rules
C00 and later versions of the C compiler adhere to the following rules:
•
All structures and nested substructures begin and end on an even byte boundary.
•
When a CHAR or CHAR ARRAY item directly follows another CHAR or CHAR
ARRAY item, no filler exists between them. (This rule does not apply if the first
CHAR data is within a substructure and the second is outside of the structure.)
For example, the following structure definition specifies four bytes of data CHAR
b
begins at offset three within STRUCTs.
struct
{
char a[3];
char b;
} s;
In the next example,
s1.y
starts at offset four; C adds a byte of filler at the end of the
nested STRUCT:
struct
{
struct
Note. The DDL compiler does not generate C output for a structure definition if the alignment
is not compatible to that of other languages. Incompatibility can occur if, for example, the C
compiler adds implicit FILLER bytes to a structure wherever DDL does not add FILLER bytes.
Содержание DDL D40
Страница 36: ...Introduction to DDL Data Definition Language DDL Reference Manual 426798 002 1 14 Examining a Dictionary ...
Страница 66: ...Named Constants Data Definition Language DDL Reference Manual 426798 002 4 10 Standard SPI Constants ...
Страница 230: ...Dictionary Manipulation Statements Data Definition Language DDL Reference Manual 426798 002 8 14 SHOW USE OF Statement ...
Страница 370: ...Dictionary Maintenance Data Definition Language DDL Reference Manual 426798 002 10 24 Converting a Dictionary ...
Страница 456: ...Sample Schemas Data Definition Language DDL Reference Manual 426798 002 B 12 ASSNDDL Statements ...
Страница 470: ...DDL Data Translation Data Definition Language DDL Reference Manual 426798 002 C 14 ...
Страница 528: ...Dictionary Reports Data Definition Language DDL Reference Manual 426798 002 E 8 Requesting Reports ...
Страница 552: ...DDL Alignment Rules Data Definition Language DDL Reference Manual 426798 002 H 4 FIELDALIGN_SHARED8 Alignment Rules ...
Страница 576: ...Index Data Definition Language DDL Reference Manual 426798 002 Index 22 Special Characters ...