TAL Reference Manual
Statements
TAL Reference Manual—526371-001
12-27
Example of IF Statements
For more information on the IF statement execution and IF-ELSE pairing, see Section
12, “Controlling Program Flow,” in the
TAL Programmer’s Guide.
Example of IF Statements
This example compares two arrays:
INT .new_array[0:9];
INT .old_array[0:9];
INT item_ok;
IF new_array = old_array FOR 10 WORDS THEN
item_ok := 1
ELSE
item_ok := 0;
MOVE Statement
The move statement copies contiguous bytes, words, or elements to a new location.
destination
is the identifier, with or without an index, of the variable to which the copy operation
begins. It can be a simple variable, array, simple pointer, structure, structure data
item, or structure pointer, but not a read-only array.
':='
specifies a left-to-right sequential move. It starts copying data from the leftmost
item in
source.
'=:'
specifies a right-to-left sequential move. It starts copying data from the rightmost
item in
source.
source
destination ':='
':='
FOR count
count
-unit
constant
[
constant ]
constant-list
&
->
next-
addr
VST1217.vsd