H-Series Application Migration Guide (H06.03+)

pTAL Migration Tasks
H-Series Application Migration Guide429855-006
7-8
16-Byte-Aligned Data
--SHARED8
END;
STRUCT A1(A); --The base of A1 is guaranteed to be aligned
--on a 16-byte boundary
STRUCT B(*) FIELDALIGN(SHARED8);
BEGIN
INT(16) KK;
FILLER 14;
STRUCT A2(A); --The base of A2 is guaranteed to be
--aligned on a 16-byte boundary
END;
STRUCT B1(B); --The base of B1 is guaranteed to be aligned
--on a 16-byte boundary because the largest
--alignment of the components of B1, namely
--A2, is 16 bytes
Note the following regarding this example:
When the TNS/E pTAL compiler encounters the statement STRUCT A2(A)
declared within STRUCT B, a warning is issued to remind programmers that this
STRUCT is incompatible with the same STRUCT compiled with the TNS/R pTAL
compiler.
Structs declared with MAXALIGN cannot be used as fields in FIELDALIGN
SHARED 2 structs.
See the pTAL Reference Manual for details on the use of 16-byte data alignment.