ENFORM Reference Manual
AS Clause
Clauses
058057 Tandem Computers Incorporated 5–13
Display Format and Scale. The output mask used to display a value has no effect on the
scale of the value. For example, if the value of the user-variable “cost” is an integer,
and the variable appears in the query as:
LIST (cost) AS M<99.99>, ...
zeroes are displayed to the right of the decimal point (the mask does not change the
INTEGER format). If cost were declared as INTERNAL F4.2, and appeared in the
query as:
LIST (cost) AS M<99>, ...
the value of cost would be displayed without the digits to the right of the decimal
point.
More information on scale appears in Section 3, under AGGREGATES and
ARITHMETIC EXPRESSIONS.
Examples of the Mask Edit Descriptor. The following examples show the affect of the mask
edit descriptor.
Format Item Value Printed Item
------ ---------- ------------
M"99/99/99" 103179 10/31/79
M'Z,ZZ9
.
99' 32.009 32.01
M<Z,ZZZ> 666 666
M<9,999> 666 0,666
M<9,999> 66666 *****
M<$ZZZ,ZZ9.99> 92000.00 $ 92,000.00
A query with these AS clauses:
amount AS M<$ZZ
,
ZZ9>,
date AS M<Z9/Z9/99>,
district AS A8,
telephone AS M<(999)
999-9999>
for these target-item values:
Amount := 9758 21573 15532
Date := 031777 091779 090579
District := West Midwest South
Telephone := 2135296800 2162296270 4047298400
produces this report:
$ 9,758 3/17/77 West (213) 529-6800
$21,573 9/17/77 Midwest (216) 229-6270
$15,532 9/ 5/79 South (404) 729-8400