Data Types

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, AIX/Power, and Sun SPARC, unless otherwise specified.

Data Type Size Alignment: aligned data Alignment: unaligned data
Fixed Binary Signed (p <= 7) 1 1 byte 1 byte byte
Fixed Binary Signed (8 <= p <= 15) 2 bytes 2 bytes byte
Fixed Binary Signed (16 <= p <= 31)     4 bytes 4 bytes byte
Fixed Binary Signed (32 <= p <= 63)   8 bytes

4 bytes (32-bit system)

8 bytes (64-bit system)

byte
Fixed Binary Unsigned (p <= 8)  2 1 byte 1 byte byte
Fixed Binary Unsigned (9 <= p <= 16) 2 bytes 2 bytes byte
Fixed Binary Unsigned (17 <= p <= 32)    4 bytes 4 bytes byte
Fixed Binary Unsigned (33 <= p <= 64)    8 bytes

4 bytes (32-bit system)

8 bytes (64-bit system)

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),

8 bytes ( Intel 64-bit, Sparc, RS/6000)

byte
Float Decimal (p) 12 bytes 4 bytes byte
Character (n) n bytes byte byte
Character (n) Varying n+2 bytes 2 bytes byte
Character (n) Varyingz n+1 bytes byte byte
Graphic(n) n*2 bytes byte byte
Graphic(n) Varying n*2+2 bytes 2 bytes byte
Graphic(n) Varyingz n*2+2 bytes byte byte
Widechar (n) n*2 bytes byte byte
Widechar (n) Varying n*2+2 bytes Half-word byte
Widechar(n) Varyingz n*2+1 bytes byte 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 (32-bit) 8 bytes 4 bytes byte
Entry Variable (64-bit) 16 bytes 8 bytes byte
File Variable (32-bit) 4 bytes 4 bytes byte
File Variable (64-bit) 8 bytes 8 bytes byte
Entry Limited (32-bit) 4 bytes 4 bytes byte
Entry Limited (64-bit) 8 bytes 8 bytes byte
Structure3 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.

Note:

In the descriptions of data types that follow, the alignment specified is the default, which is ALIGNED for all data types except Bit. For the alignment of each data type with the UNALIGNED attribute, refer to the table above.