pTAL Reference Manual (H06.03+)

Data Representation
HP pTAL Reference Manual523746-005
3-5
Address Types
The data type of a variable also determines which built-in routines you can use with the
variable (see Section 15, Built-In Routines).
Address Types
Every identifier that you declare has both a data type and an address type. The data
type describes the data item itself. The address type describes the address of the data
item. If you declare a pointer to the data item, the value that you assign to the pointer
must be of that address type.
You cannot explicitly declare the address type of a pointer. When you declare a pointer,
the compiler determines its address type.
Table 3-4. Data Types and Their Address Types (page 1 of 2)
Pointer Declaration Data Type Address Type Storage Unit
1
STRING
INT
INT(32)
REAL
REAL(64)
FIXED
UNSIGNED(n)
STRUCT
SUBSTRUCT
addr-type
2
. s ;
.i;
.j;
.r;
.s;
.f;
.u;
.t;
.v;
.a;
STRING
INT
INT(32)
REAL
REAL(64)
FIXED
UNSIGNED
none
none
address_type
3
BADDR
WADDR
WADDR
WADDR
WADDR
WADDR
WADDR
WADDR
BADDR
WADDR
Byte
Word
Word
Word
Word
Word
Word
Word
Byte
Word
STRING
INT
INT(32)
REAL
REAL(64)
FIXED
UNSIGNED(n)
STRUCT
SUBSTRUCT
addr-type
2
.EXT s;
.EXT i;
.EXT j;
.EXT r;
.EXT s;
.EXT f;
.EXT u;
.EXT t;
.EXT v;
.EXT a;
STRING
INT
INT(32)
REAL
REAL(64)
FIXED
UNSIGNED
none
none
address_type
3
EXTADDR
EXTADDR
EXTADDR
EXTADDR
EXTADDR
EXTADDR
EXTADDR
EXTADDR
EXTADDR
EXTADDR
Byte
Byte
Byte
Byte
Byte
Byte
Byte
Byte
Byte
Byte
STRING
INT
INT(32)
REAL
REAL(64)
FIXED
UNSIGNED(n)
addr-type
2
.SG s;
.SG i;
.SG j;
.SG r;
.SG s;
.SG f;
.SG u;
.SG a;
STRING
INT
INT(32)
REAL
REAL(64)
FIXED
UNSIGNED
address_type
3
SGBADDR
SGWADDR
SGWADDR
SGWADDR
SGWADDR
SGWADDR
SGWADDR
SGWADDR
Byte
Word
Word
Word
Word
Word
Word
Word
1. Table 3-1 on page 3-1 describes storage units.
2. addr-type is any of the ten address types.
3. address_type is the same address type as specified in the declaration.