pTAL Reference Manual (H06.08+)

HP pTAL Reference Manual523746-006
3-1
3 Data Representation
A program operates on datavariables and constantswhich it stores in the storage
units that Table 3-1 on page 3-1 describes.
Topics:
Data Types on page 3-1
Address Types on page 3-5
Constants on page 3-12
Data Types
When you declare a variable, you specify its data type, which determines:
Its storage unit
The values that you can assign to it
The operations that you can perform on it
Its address type
Table 3-1. Storage Units
Storage Unit Number of Bits Description
Byte 8 Smallest addressable unit of memory.
Word 16 2 bytes, with byte 0 (most significant) on the left and
byte 1 (least significant) on the right
Doubleword 32 4 bytes
Quadrupleword 64 8 bytes
n-bit field 1-16 Contiguous bit fields within 2 bytes
17-31 Contiguous bit fields within 4 bytes
Table 3-2. Data Types (page1of2)
Data Type Storage Unit
1
Values the Data Type Can Represent
STRING Byte
ASCII character
Unsigned 8-bit integer in the range 0 through
255
1. Table 3-1 on page 3-1 describes storage units.
2. INT and INT(16) are the same type.
3. FIXED, FIXED(0), and INT(64) are the same type.
4. REAL and REAL(32) are the same type.