Enform Plus Reference Manual

Enform Plus Language Elements
Enform Plus Reference Manual422684-001
3-20
Literals
If you want the aggregate to return a value with a scale other than that of the input field,
assign the result to a user variable declared with the appropriate scale. For example:
DECLARE fixit INTERNAL F6.2;
LIST fixit := AVG (price OVER partnum);
The average of price over part number will now be returned with six total digits,
with two digits to the right of the decimal point.
Literals
Literals can be used in both a target-list and a request-qualification. Literals can also be
used in many Enform Plus statements and clauses. Literals are used in titles, headings,
special text printed within a report's body, and in expressions. The two types of literals
are numeric and string.
Literals cannot be continued across lines. The maximum length of a literal is 127
characters.
Numeric Literals
Numeric literals are used in all arithmetic expressions. They can be used in logical
expressions when the literal is compared to a database element described in the data
dictionary as numeric. Numeric literals:
Are not enclosed in quotation marks
Are composed of the digits 0-9
Can be preceded or followed by a plus or minus sign
Must be enclosed in parentheses if they are specified outside of a logical expression
or a TAB, SPACE, SKIP, or FORM clause
Numeric literals can stand alone as target-items in a LIST or FIND statement. In this
case, they must be enclosed in parentheses.
The following are examples of numeric literals:
(104) (123.0444) (+267) (.006) (-15)
String Literals
String literals can be used in many Enform Plus statements and clauses. String literals
can be used in logical expressions if the database element to which the string literal is
compared is declared alphabetic or alphanumeric in the data dictionary. String literals:
Can be composed of any character in the ASCII character set.
Must be enclosed in quotation marks. If a quotation mark is part of a string literal,
the quotation mark must be doubled.