Enform Plus Reference Manual

Enform Plus Language Elements
Enform Plus Reference Manual422684-001
3-21
Arithmetic Expressions
The following are examples of string literals:
"This is a string literal"
"This string literal contains a "" quotation mark"
"1234.99"
String literals can stand alone as target-items in a LIST statement. By using a string
literal in this manner, you allow printing of one or more constant characters between two
columns of data. For example:
LIST customer,"....",address;
produces the following report:
CUSTOMER ADDRESS
------------------ -----------------------
CENTRAL UNIVERSITY....UNIVERSITY WAY
BROWN MEDICAL CO ....100 CALIFORNIA STREET
Arithmetic Expressions
Arithmetic expressions are some combination of numeric literals, field values, variables,
or aggregates that are added, subtracted, multiplied, or divided to yield a single value. A
JULIAN-DATE clause, TIMESTAMP-DATE clause, or a TIMESTAMP-TIME clause
can also be used in an arithmetic expression. Arithmetic expressions must be enclosed in
parentheses.
Table 3-3
lists the arithmetic operators and their functions.
Spaces are not required before any of the arithmetic operators with the exception of the
subtraction sign (-). At least one space must precede a subtraction sign that follows a
field or variable name.
Arithmetic expressions can be simple:
(price + 10.00)
or they can be complex:
((price + 10.00)* quantity)
Table 3-3. Arithmetic Operators
Operator Function
+ Addition
- Subtraction
* Multiplication
/ Division