TAL Reference Manual

Data Representation
TAL Reference Manual526371-001
3-17
Examples of Constant Lists
repetition-factor
is an INT constant that specifies the number of times constant-list-seq occurs.
constant-list-seq
is a list of one or more constants, each stored on an element boundary.
constant
is a character string, a number, or a LITERAL specified as a single operand.
The range and syntax for specifying constants depends on the data type, as
described for each data type on preceding pages.
Examples of Constant Lists
1. The two examples in each of the following pairs are equivalent:
[ "A", "BCD" , "...", "Z" ]
[ "ABCD...Z" ]
10 * [0];
[0,0,0,0,0,0,0,0,0,0]
[3 * [2 * [1], 2 * [0]]]
[1,1,0,0,1,1,0,0,1,1,0,0]
10 * [" "]
[" "]
2. This example shows how you can break a constant string that is too long to fit on
one line into smaller constant strings specified as a constant list. The system
stores one character to a byte:
STRING a[0:99] := ["These three constant strings will ",
"appear as if they were one constant ",
"string continued on multiple lines."];
VST0309.vsd
constant-list-seq
[
repetition-factor
*
]
VST0310.vsd
constant
repetition-constant-list
,