TAL Reference Manual
Expressions
TAL Reference Manual—526371-001
4-19
Assignment Expression
Assignment Expression
The assignment expression assigns the value of an expression to a variable.
variable
is the identifier of a variable in which to store the result of expression. (variable can
have an optional bit-deposit field.)
expression
is an expression having the same data type as variable. The result of expression
becomes the result of the assignment
expression. Expression is either:
•
An arithmetic expression
•
A conditional expression (excluding a relational operator with no operands), the
result of which has data type INT
Examples of Assignment Expressions
1. This example decrements A. As long as A– 1 is not 0, the condition is true and the
THEN clause is executed:
IF (a := a - 1) THEN ... ;
2. This example shows the assignment form used as an index. It decrements A and
accesses the next array element:
IF array[a := a - 1] <> 0 THEN ... ;
Table 4-12. Special Expressions
Expression
Form
Kind of
Expression Description Page
Assignment Arithmetic Assigns the value of an expression to a
variable
4-19
CASE Arithmetic Selects one of several expressions 4-20
IF Arithmetic Conditionally selects one of two
expressions
4-21
Group
comparison
Conditional Does unsigned comparison of two sets of
data
4-23
variable
:= expression
VST0405.vsd