pTAL Conversion Guide

Statements
pTAL Conversion Guide527302-002
15-2
Assignment Statement
Assignment Statement
This topic explains the differences between assignment statements in TAL and pTAL. It
considers only the assignment portion of an assignment statement. For compatibility of
TAL and pTAL expressions, see Section 13, Expressions.
Rules for pTAL assignment statementsL:
The data type of the expression on the right side of an assignment statement must
be compatible with the data type of the destination on the left side of the
assignment statement.
You cannot store a value into the implicit pointer of an indirect array or indirect
structure.
You cannot store a value into the implicit pointer of an equivalenced variable that
references the data of an indirect array or indirect structure.
Do not depend on whether the left side or the right side of an assignment
statement is evaluated first.
RETURN Statement on page 15-19 Procedures that return a condition code must
specify the RETURNSCC procedure attribute and
must explicitly specify, in the RETURN statement,
the condition code to return.
Functions that return a condition code that is not
based on the value returned by the function must
specify the RETURNSCC procedure attribute and
must specify explicitly, in the RETURN statement,
the value of the condition code to return.
Functions must include at least one RETURN
statement.
Functions must return by explicitly executing a
RETURN statement, not implicitly by reaching the
end of the function’s code.
SCAN and RSCAN Statements
on
page 15-23
A scan must stop before exceeding the end of the
scan buffer.
STACK pTAL does not support STACK statements.
STORE pTAL does not support STORE statements.
USE Statement
on page 15-26 pTAL manages USE variables as if they were INT
variables. Do not depend on whether the value of a
USE variable is maintained in memory or in a native
register.
WHILE Statement
on page 15-27 Hardware indicators cannot appear in the
conditional expression of a WHILE statement.
Table 15-1. Summary of Statement Differences in pTAL (page 2 of 2)
Statement Differences From TAL