pTAL Conversion Guide

pTAL Conversion Guide527302-002
6-1
6
Constants, LITERALs, and DEFINEs
Character constants are the same in TAL and pTAL except in null strings and REAL
variables.
Null Strings
TAL
You can assign a character constant null string ("") to a variable in the variable’s
declaration or in an assignment statement. You cannot, however, declare a LITERAL
whose value is a null string; therefore, you cannot initialize a variable to a null string
using a LITERAL.
pTAL
You cannot assign a null string to a variable in the variable’s declaration or in an
assignment statement:
INT i := ""; ! Valid in TAL, invalid in pTAL
i := ""; ! Valid in TAL, invalid in pTAL
REAL Variables
TAL
You can store a character constant in a REAL variable in the variable’s declaration or
in an assignment statement.
pTAL
You cannot assign a character constant to a REAL variable in an assignment
statement:
REAL s;
s := "ABCD"; ! Valid in TAL, invalid in pTAL