pTAL Conversion Guide

Statements
pTAL Conversion Guide527302-002
15-7
Changing Implicit Pointers
Changing Implicit Pointers
TAL
You can change the implicit pointer of an indirect array or indirect structure.
pTAL
You cannot assign a value to the implicit pointer of an indirect array or indirect
structure. Because all native memory is addressable as a single continuous address
space, the native compiler does not necessarily allocate an implicit pointer for indirect
arrays and indirect structures.
CALL Statement
The CALL statement in pTAL is fully compatible with the CALL statement in TAL;
however, pTAL and TAL requirements for procedure declaration and passing
parameters are different.
TAL
A procedure’s formal and corresponding actual parameters match if each contains the
same number of bits.
Example 15-6. Implicit Pointer Change (TAL)
INT .a[0:99];
INT .b[0:99];
@a := @b; ! Change a to reference b's data
Example 15-7. Implicit Pointer Change (pTAL)
Invalid:
INT .a[0:9]; ! Indirect array
STRUCT .EXT s(s_tpl); ! Extended structure
@a := 0; ! ERROR: Attempt to store into implicit pointer
@s := 0; ! ERROR: Attempt to store into implicit pointer
Valid:
INT .a[0:9]; ! Indirect array
STRUCT .s(s_tpl); ! Indirect structure
INT .p; ! Pointer
@p := @a; ! p now points to data in a
@p := @s; ! p now points to data in s
@p := 0; ! Address in p is zero