pTAL Reference Manual (H06.03+)

Pointers
HP pTAL Reference Manual523746-005
10-14
Initializing Simple Pointers
initialization
An expression representing a memory address. For more information about
operations on addresses, see Section 5, Expressions.
The data type determines the size of data a simple pointer can access at a time.
The addressing mode and data type of the simple pointer determines the kind of
address the pointer can contain.
For information about data types and addresses, see Table 10-1 on page 10-6 and
Table 10-2 on page 10-7.
Furthermore, the kind of expression you can specify for the address depends on the
level at which you declare the pointer:
At the global level, use a constant expression.
At the local or sublocal level, you can use any arithmetic expression.
Initializing Simple Pointers
You can initialize global standard pointers by using constant expressions such as:
Expressions other than those in the preceding list can perform valid type conversions,
but the compiler recognizes only those in the preceding list and might diagnose others
as errors.
Expression Meaning
@identifier Accesses address of variable
@identifier '<<' 1 If @identifier is a WADDR address, ‘<<‘ converts it to a
BADDR address.
If @identifier is a SGWADDR address, ‘<<‘ converts it to a
SGBADDR address.
@identifier '>>' 1 If @identifier is a BADDR address, ‘>>‘ converts it to a
WADDR address.
If @identifier is a SGBADDR address, ‘>>‘ converts it to a
SGWADDR address.
@identifier [index ] Accesses address of variable indicated by index
Built-in routine Any that return a constant value, such as $OFFSET