pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

1
Table 17 (page 46) 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.
4
64-bit addressing functionality added to the EpTAL compiler starting with SPR T0561H01^AAP. For more information,
see Appendix E, “64-bit Addressing Functionality” (page 531).
You can compare addresses using the relational operators described in Table 12 (page 39).
Topics:
Storing Addresses in Variables (page 51)
Converting Between Address Types and Numeric Data Types (page 51)
Converting Between Address Types (page 52)
Using Indexes to Access Array Elements (page 54)
Incrementing and Decrementing Addresses (Stepping Pointers) (page 54)
Computing the Number of Bytes Between Addresses (page 55)
Comparing Addresses to Addresses (page 56)
Comparing Addresses to Constants (page 56)
Comparing Procedure Addresses and Procedure Pointers (page 56)
Testing a Pointer for a Nonzero Value (page 56)
Storing Addresses in Variables
You can store an address into a variable when either of the following is true:
The address is the same data type as the variable into which you are storing the address.
The address is convertible to the data type of the variable into which you are storing the
address.
Converting Between Address Types and Numeric Data Types
You can move any 16-bit integer value—a constant or variable—into any system global address
type (SGBADDR, SGWADDR, SGXBADDR, or SGXWADDR). Conversely, you can move the value
of any system global data type into a 16-bit integer variable.
You can move an EXTADDR into an INT(32), or an INT(32) into an EXTADDR.
You can also move an EXTA32DDR into an INT(32), or an INT(32) into an EXT32ADDR.
Exceptions: You cannot convert the following address types to numeric data types:
CBADDR
CWADDR
PROCADDR
PROC32ADDR
PROC64ADDR
NOTE: The address types, EXT32ADDR, EXT64ADDR, PROC32ADDR, and PROC64ADDR are
available in the 64-bit addressing functionality added to the EpTAL compiler starting with SPR
T0561H01^AAP. For more information, see Appendix E, “64-bit Addressing Functionality”
(page 531).
Address Types 51