Named Constants
Data Definition Language (DDL) Reference Manual — 426798-002
4 -6
CONSTANT Statement
Pascal Guidelines
The following points are guidelines for generating Pascal source code from
CONSTANT statements:
•
If you request Pascal source-code output, by giving the PASCAL command, DDL
generates Pascal constants.
•
DDL converts any hyphen in the constant name to an underscore (_) in the Pascal
constant name.
•
Pascal does not support the TYPE clause in the CONSTANT statement.
•
For a string constant, DDL generates a Pascal FSTRING constant.
•
For a numeric constant, DDL generates a Pascal numeric constant.
•
For a version constant, DDL generates the version number.
TACL Guidelines
The following points are guidelines for generating TACL source code from CONSTANT
statements:
•
If you request TACL source-code output, by giving the TACL command, DDL
generates TACL TEXT variables for named constants.
•
DDL converts any hyphen in the constant name to a circumflex (^) in the TACL
TEXT variable name.
•
For a string constant, DDL 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. DDL precedes the following
special characters with a tilde (~) in the variable:
[ ] { } | ==
For example, the value in the following CONSTANT statement includes special
characters.
CONSTANT tacl-out VALUE IS "#OUTPUT [#NEXTFILENAME]".
This CONSTANT statement results in the following TACL source code:
?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, DDL does not generate the TACL constant.
•
For a numeric constant, DDL generates a TACL TEXT variable with a value
identical to the value of the DDL constant.