Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 67
TYPE Clause
Bit Field Output for Pascal. The following examples show how DDL translates
definitions and descriptions of bit fields into Pascal source code:
DEF Enum-Spec Begin
TYPE ENUM.
89 Val-1 Value 1.
89 Val-2 Value 3.
89 Val-3 Value 0.
End.
INTEGER*2 ENUMSPEC
C VAL-1 = 1
C VAL-2 = 3
C VAL-3 = 0
DEF Bits-With-Enums.
02 Bit-Field-1 TYPE BIT 8
ENUM Enum-Spec.
02 Bit-Field-2 TYPE BIT 4.
End.
RECORD BITSWITHENUMS
FILLER*2
END RECORD
DEF Reused-Bits.
02 Data-Item Type Binary.
02 Bits-Layout-1
Redefines Data-Item.
03 F-11 TYPE BIT 5.
03 F-12 TYPE BIT 6.
03 F-13 TYPE BIT 4.
02 Bits-Layout-2
Redefines Data-Item.
03 F-21 TYPE BIT 4.
03 F-22 TYPE BIT 3.
End.
RECORD REUSEDBITS
INTEGER*2 DATAITEM
RECORD BITSLAYOUT1
FILLER*2
END RECORD
EQUIVALENCE (BITSLAYOUT1,DATAITEM)
RECORD BITSLAYOUT2
FILLER*2
END RECORD
EQUIVALENCE (BITSLAYOUT2,DATAITEM)
DDL Type
Pascal Type
DEF Bit-1 TYPE BIT 1.
DEF New-Bit-1 TYPE Bit-1.
DEF Bit-10 TYPE BIT 10 UNSIGNED.
TYPE BIT_1_DEF = INT(1);
TYPE NEW_BIT_1_DEF = BIT_1_DEF;
TYPE BIT_10_DEF = UNSIGNED(10);
DDL Type
FORTRAN Type