pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
Result ReturnedRelational Operator
True if CCL or CCE<= or '<='
True if CCE or CCG>= or '>='
Examples of unsigned operators are as follows:
IF VAR '>' 10 THEN
...
ELSE IF < THEN -- Unsigned less than
... ;
IF VAR '<' 5 THEN
...
ELSE IF '>' THEN -- Unsigned greater than
... ;
Special Expressions
Special expressions allow you to perform specialized arithmetic or conditional operations.
Table 38 Special Expressions
DescriptionExpression TypeSpecial Expression
Assigns the value of an expression to a variableArithmeticAssignment
Selects one of several expressionsArithmeticCASE
Selects one of two expressionsArithmeticIF
Performs unsigned comparison of two sets of dataConditionalGroup Comparison
Assignment
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 of 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:
Special Expressions 85