TAL Reference Manual
Compiler Directives
TAL Reference Manual—526371-001
16-56
Example of INT32INDEX Directive
NOINT32INDEX does not override INHIBITXX or NOINHIBITXX.
Example of INT32INDEX Directive
The following example shows the use of INT32INDEX, which always generates correct
offsets, and NOINT32INDEX, which generates incorrect offsets in certain cases:
?INT32INDEX !Set INT32INDEX attribute
! for next declaration
STRUCT .EXT xstruct[0:9999];!XSTRUCT has INT32INDEX
BEGIN ! attribute
STRING array[0:9];
END;
INT index;
PROC my_proc MAIN;
BEGIN
?NOINT32INDEX !Set NOINT32INDEX
! attribute for next
! declaration
INT .EXT xstruct2 (xstruct) := @xstruct[0];
!XSTRUCT2 has NOINT32INDEX
! attribute
xstruct[index].array[0]:= 1;!Generate correct offset even
! when offset is > 32,767,
! because XSTRUCT has
! INT32INDEX attribute
xstruct2[index].array[0] := 1;
!Generate incorrect offset
! if offset is > 32,767,
! because XSTRUCT2 has
END; ! NOINT32INDEX attribute