pTAL Conversion Guide

Arrays
pTAL Conversion Guide527302-002
9-4
Arrays of Addresses
pTAL
The number of bits in the initialization string must be equal to the number of bits in the
array:
Arrays of Addresses
In pTAL, the data type of an array can be one of the pTAL address types. The syntax of
an array declaration is:
type
is one of the following data types:
Example 9-4. Constant Lists in Nonstring Array Declarations (pTAL)
Invalid:
INT .a[0:3] := [0,1,2]; ! ERROR: string is too short
INT .a[0:3] := [0,1,2,3,4]; ! ERROR: string is too long
Valid:
INT .a[0:3] := [0,1,2,3];
INT .a[0:3] := [%H1234567812345678%F];
STRING REAL SGBADDR
INT REAL(64) SGWADDR
INT(32) BADDR SGXBADDR
UNSIGNED ( width ) WADDR SGXWADDR
FIXED [ ( fpoint ) ] CBADDR EXTADDR
CWADDR PROCADDR
type
range
:= initialization
;
identifier
.
.EXT
.SG
.SGX
,
VST021.vsd