Guardian Procedure Calls Reference Manual (G06.25+)
Formatter Edit Descriptors
Guardian Procedure Calls Reference Manual—522629-013
F-29
List-Directed Formatting
List-Directed Formatting
List-directed formatting provides the data conversion capabilities of the formatter
without requiring the specification of a format. The FORMATDATA procedure
determines the details of the data conversion, based on the types of the data elements.
This is particularly convenient for input because the list-directed formatting rules
provide for free-format input of data values rather than requiring data to be supplied in
fixed fields. There are fewer advantages to using list-directed formatting for output
because the output data is not necessarily arranged in a convenient readable form.
The characters in one or more list-directed buffers constitute a sequence of data-list
items and value separators. Each value is either a constant, a null value, or one of the
following forms:
r*c r*
r is an unsigned, nonzero, integer constant.
r*c form is equivalent to r successive appearances of the constant c.
r* form is equivalent to r successive null values.
Neither of these forms can contain embedded blanks, except where permitted with
the constant
c.
List-Directed Input
All input forms that are acceptable to FORMATDATA when directed by a format are
acceptable for list-directed input, with the following exceptions:
•
When the data element is a complex variable, the input form consists of a left
parenthesis followed by an ordered pair of numeric input fields separated by a
comma and followed by a right parenthesis.
•
When the data element is a logical variable, the input form must not include either
slashes or commas among the optional characters for the L editing.
•
When the data element is a character variable, the input form consists of a string of
characters enclosed in apostrophes. The blank, comma, and slash may appear in
the string of characters.
•
A null value is specified by having no characters other than blanks between
successive value separators, no characters preceding the first value separator in
the first buffer, or the
r* form. A null value has no effect on the value of the
corresponding data element. The input list item retains its previous value. A single
null value must represent an entire complex constant (not just part of it).
If a slash value separator is encountered during the processing of a buffer, data
conversion is terminated. If there are additional elements in the data list, the effect is
as if null values had been supplied for them.