Guardian Procedure Calls Reference Manual
Format Two: M<$ 999,999,999 AND NO CENTS>
Format TwoFormat One
$ 298,738,472 AND NO CENTS$ 298,738,472 AND NO CENTS
$ 000,389,488 AND NO CENTS$ 389,488 AND NO CENTS
$ 000,000,666 AND NO CENTS$ 666 AND NO CENTS
$ 000,000,000 AND NO CENTS$ 0 AND NO CENTS
The M edit descriptor can be useful in producing visually effective reports, by formatting values
into patterns that are meaningful in terms of the data they represent. For example, assume that four
arrays contain this data:
Amount := 9758 21573 15532
Date := 031777 091779 090579
District := 'WEST','MIDWEST','SOUTH'
Telephone := 2135296800,2162296270,4047298400
This format can then be used to output the data as a table whose entries are in familiar forms.
Assuming the elements are presented to the formatter in the order: the first elements of each array,
followed by the second elements of each array, and so on, using this format:
M<$ZZ,ZZ9>,M< Z9/99/99>,3X,A8,M< (999) 999-9999>
the result would be:
$ 9,758 3/17/77 WEST (213) 529-6800
$21,573 9/17/79 MIDWEST (216) 229-6270
$15,532 9/05/79 SOUTH (404) 729-8400
The O Edit Descriptor
The O edit descriptor is used to display or interpret data values in octal (base 8) integer form.
The O edit descriptor has these forms:
Ow.mOROw
an unsigned integer constant that defines the total field width and cannot exceed 255. The field processed is
the w characters starting at the current position. After the field is processed, the current position is advanced
by w characters.
w
an unsigned integer constant that defines the number of digits that must be present on output.m
The O edit descriptor is used in the same manner as the I edit descriptor where the number base
(b) is 8, except that the O edit descriptor always treats the internal data value as unsigned. (See
The I Edit Descriptor (page 1560).) For example, if the data item is an INT(16) in TAL, these conversions
take place:
ResultInternal ValueFormat
| 12|10O6
|000022|18O6.6
|177775|-3O6.4
The "|" character is used to denote the boundaries of the output field.
1564 Formatter Edit Descriptors