The table below lists the Open PL/I data types, along with the alignment and size of their machine representations.
Alignment is the same for Intel, RS/6000, and Sun SPARC, unless otherwise specified.
Data Type | Size | Alignment: aligned data | Alignment: unaligned data |
---|---|---|---|
Fixed Binary ( p <= 7) 1 | 1 byte | 1 byte | byte |
Fixed Binary (8 <= p <= 15) | 2 bytes | 2 bytes | byte |
Fixed Binary (16 <= p <= 31) | 4 bytes | 4 bytes | byte |
Fixed Binary (31 <= p <= 63) | 8 bytes | 8 bytes | byte |
Fixed Decimal (p,q) | [(p+2)/2] bytes | byte | byte |
Float Binary (p <= 23) | 4 bytes | 4 bytes | byte |
Float Binary (p > 23) | 8 bytes | 4 bytes (Intel 32-bit), | byte |
Float Decimal (p) | 12 bytes | 4 bytes | byte |
Character (n) | n bytes | byte | byte |
Character (n) Varying | n+2 bytes | 2 bytes | byte |
Graphic(n) | n*2 bytes | byte | byte |
Graphic(n) Varying | n*2+2 bytes | 2 bytes | byte |
Widechar (n) | n*2 bytes | byte | byte |
Widechar (n) Varying | n*2+2 bytes | Half-word | byte |
Bit (n) | n bits | bit | bit |
Bit (n) Aligned | [(n+7)/8] bytes | byte | – |
Pointer (32-bit) | 4 bytes | 4 bytes | byte |
Pointer (64-bit) | 8 bytes | 8 bytes | byte |
Picture | n bytes | byte | byte |
Label | 8 bytes | 4 bytes | byte |
Entry Variable | 8 bytes | 4 bytes | byte |
File Variable | 4 bytes | 4 bytes | byte |
Structure2 | sum of members + gaps for alignment | max of members | byte |
Area (n) | (((n+7)/8)*8)+8 bytes | 8 bytes | – |
Offset | 4 bytes | 4 bytes | byte |
Subsequent sections provide additional information about the size, alignment, internal representation including byte ordering, and range, where applicable.
The byte ordering on the IBM RS/6000 and Sun SPARC platforms is Big Endian, while the Intel-based platforms have Little Endian byte ordering.
*Fixed Binary (p <= 7 ) is handled as a one-byte signed binary integer by default. To override this default and handle as a two-byte signed binary integer, use the -fb7asfb15 compiler option.