Literals; String Literals - Tandem ENFORM 058057 Reference Manual

Data management library
Table of Contents

Advertisement

ENFORM Language Elements

Literals

Literals
Numeric Literals

String Literals

3–22
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 can be used in both a target-list and a request-qualification. Literals can also
be used in many ENFORM 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 are used in all arithmetic expressions. They can be used in logical
expressions when the literal is compared to a data base 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 can be used in many of the ENFORM statements and clauses. String
literals can be used in logical expressions if the data base 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.
The following are examples of string literals:
"This is a string literal"
"This string literal contains a "" quotation mark"
"1234.99"
058057 Tandem Computers Incorporated

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enform

Table of Contents