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 HP PA-RISC, 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 (p > 15) | 4 bytes | 4 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), | byte |
Float Decimal (p) | 12 bytes | 4 bytes | byte |
Character (n) | n bytes | byte | byte |
Character (n) Varying | n+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 | 4 bytes | 4 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 HP PA-RISC, 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 only if the -vax Compiler option is in effect. Otherwise, it is handled as Fixed Binary(15).