Definition Attributes
Bit Field Output for pTAL and TAL. The following examples show how DDL
translates definitions and descriptions of bit fields into TAL source code:
DDL Type
DEF Bit-1 TYPE BIT 1.
DEF New-Bit-1 TYPE Bit-1.
DEF Bit-10 TYPE BIT 10 UNSIGNED.
DEF Bit-Map.
2 Bits-8 TYPE BIT 8.
2 Bits-3 TYPE BIT 3 UNSIGNED.
2 Bits-10 TYPE BIT 10.
End.
DEF Bit-Struct.
2 Bits-0 TYPE Bit-1.
2 Bits-1-To-10 TYPE Bit-10.
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.
Data Definition Language (DDL) Reference Manual—426798-002
pTAL or TAL Type
INT
BIT^1;
INT
NEW^BIT^1;
INT
BIT^10;
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;
STRUCT BIT^STRUCT^DEF (*) FIELDALIGN(SHARED2);
BEGIN
UNSIGNED(1)
BITS^0;
UNSIGNED(10)
BITS^1^TO^10;
BIT_FILLER
5;
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;
6- 71
TYPE Clause