Data Definition Language (DDL) Reference Manual
Named Constants
Data Definition Language (DDL) Reference Manual—529431-004
4-7
TACL
TACL
When generating TACL source code from CONSTANT statements:
•
If you request TACL source-code output, by giving the TACL command, the DDL
compiler generates TACL TEXT variables for named constants.
•
The DDL compiler converts any hyphen in the constant name to a circumflex (^) in
the TACL TEXT variable name.
•
For a string constant, the DDL compiler generates a TACL TEXT variable with a
value derived from the DDL constant value.
°
The value of the TACL TEXT variable differs from the DDL constant if certain
special characters are specified in the constant. The DDL compiler precedes
these special characters with a tilde (~) in the variable:
[ ] { } | ==
For example, the value in this CONSTANT statement includes special
characters:
CONSTANT tacl-out VALUE IS "#OUTPUT [#NEXTFILENAME]".
The resulting TACL source code is:
?Section TACL^OUT TEXT
#OUTPUT ~[#NEXTFILENAME~]
°
The total number of bytes generated for a TACL string constant cannot exceed
130, including any generated tildes. If the value would be longer than 130
bytes, the DDL compiler does not generate the TACL constant.
•
For a numeric constant, the DDL compiler generates a TACL TEXT variable with a
value identical to the value of the DDL constant.
•
For a product version constant, the DDL compiler generates a TACL TEXT
variable that contains the product version number.
•
The internal representation of a DDL constant in TACL differs from these
representations:
°
The internal representation of DDL constants in pTAL, TAL, and COBOL.
°
The internal representation of all other DDL objects in TACL. For a definition,
record, token code, token map, or token type, the DDL compiler generates a
TACL STRUCT with the same internal representation as pTAL or TAL source
code.
This difference does not cause problems in messages because messages contain
data structures, not constants. If you use #APPENDV to move a TACL
representation of a DDL constant to a message for a program coded in another
language, the value in the message will not match the same DDL constant in the
other language.