Previous Topic Next topic Print topic


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

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 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.

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.

1

*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.

2 See the Structure topic for mapping conventions.
Previous Topic Next topic Print topic