Data Definition Language (DDL) Reference Manual
Definition Attributes
Data Definition Language (DDL) Reference Manual—529431-004
6-66
Specifying TYPE data-type
Bit Maps for pTAL and TAL
The output for a bit map declared as a field definition is INT. The DDL compiler ignores
bit-length.
The output for a bit map declared in a group definition or a record is UNSIGNED (bit-
length ) in a STRUCT template.
The output for a bit filler is BIT_FILLER bit-length in a STRUCT template.
Avoid defining level-89 clauses with the same name in different items. In pTAL and
TAL, two distinctive literals cannot have the same name, whether the literals are
numeric constants or are in an enumeration item. When generating output for these
languages, the DDL compiler does not check for level-89 clauses of the same name.
For a list of pTAL and TAL data types that the TYPE data-type clause generates,
see Table C-6, Sample DDL/pTAL and TAL Data Translation Table, on page C-11.
In Example 6-54 on page 6-66, the simple variable BIT^1 has a different size from the
field BITS^0 in a variable having the structure BIT^STRUCT^DEF.
Example 6-54. Bit Field Output for pTAL and TAL
DDL Type pTAL or TAL Type
DEF Bit-1 TYPE BIT 1.
DEF New-Bit-1 TYPE Bit-1.
DEF Bit-10 TYPE BIT 10 UNSIGNED.
INT BIT^1;
INT NEW^BIT^1;
INT BIT^10;
DEF Bit-Map.
2 Bits-8 TYPE BIT 8.
2 Bits-3 TYPE BIT 3 UNSIGNED.
2 Bits-10 TYPE BIT 10.
End.
STRUCT BIT^MAP^DEF (*) FIELDALIGN (SHARED2);
BEGIN
UNSIGNED(8) BITS^8;
UNSIGNED(3) BITS^3;
BIT_FILLER 5;
UNSIGNED(10) BITS^10;
BIT_FILLER 6;
END;
DEF Bit-Struct.
2 Bits-0 TYPE Bit-1.
2 Bits-1-To-10 TYPE Bit-10.
End.
STRUCT BIT^STRUCT^DEF (*) FIELDALIGN(SHARED2);
BEGIN
UNSIGNED(1) BITS^0;
UNSIGNED(10) BITS^1^TO^10;
BIT_FILLER 5;
END;
DEF Bit-Fillers.
2 Field-1 Type Character 3.
2 Filler Type Bit 4.
2 Bit-Field-1 Type Bit 5.
2 Filler Type Binary 16.
2 Field-2 Type Binary 32.
End.
STRUCT BIT^FILLERS^DEF (*) FIELDALIGN(SHARED2);
BEGIN
STRUCT FIELD^1;
BEGIN STRING BYTE[1:3]; END;
FILLER 1;
BIT_FILLER 4;
UNSIGNED(5) BIT^FIELD^1;
BIT_FILLER 7;
FILLER 2;
INT(32) FIELD^2;
END;