pTAL Reference Manual (H06.08+)
Data Representation
HP pTAL Reference Manual—523746-006
3-6
Address Types
You can compare addresses using the relational operators described in Table 2-5 on
page 2-5.
Topics:
•
Storing Addresses in Variables on page 3-7
•
Converting Between Address Types and Numeric Data Types on page 3-7
•
Converting Between Address Types on page 3-7
•
Using Indexes to Access Array Elements on page 3-9
•
Incrementing and Decrementing Addresses (Stepping Pointers) on page 3-10
•
Computing the Number of Bytes Between Addresses on page 3-11
•
Comparing Addresses to Addresses on page 3-11
•
Comparing Addresses to Constants on page 3-11
•
Comparing PROCADDRs and PROCPTRs on page 3-11
•
Testing a Pointer for a Nonzero Value on page 3-12
STRING
INT
INT(32)
REAL
REAL(64)
FIXED
UNSIGNED(n)
addr-type
2
.SGX s;
.SGX i;
.SGX j;
.SGX r;
.SGX s;
.SGX f;
.SGX u;
.SGX a;
STRING
INT
INT(32)
REAL
REAL(64)
FIXED
UNSIGNED
address_type
3
SGXBADDR
SGXWADDR
SGXWADDR
SGXWADDR
SGXWADDR
SGXWADDR
SGXWADDR
SGXWADDR
Byte
Word
Word
Word
Word
Word
Word
Word
PROC p;
PROCPTR p(); END
PROCPTR
procedure e;
ENTRY
PROC
PROCPTR
PROC
PROCADDR
PROCADR
PROCADDR
Doubleword
Doubleword
Doubleword
STRING v ='p':="ab";
INT v ='p':="ab";
SUBPROC
Subprocedure ENTRY e;
LABEL 1;
STRING
INT
SUBPROC
LABEL
CBADDR
CWADDR
CWADDR
CWADDR
CWADDR
Byte
Word
Word
Word
Word
Table 3-4. Data Types and Their Address Types (page 2 of 2)
Pointer Declaration Data Type Address Type Storage Unit
1
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.










