Guardian Programmer's Guide

Table Of Contents
Formatting and Manipulating Character Data
Guardian Programmer’s Guide 421922-014
19 - 26
List-Directed Formatting
Formatting List-Directed Input
Figure 19-8 shows how list-directed formatting works for input.
To specify list-directed formatting, you need to set bit 2 of the flags parameter to 1.
To specify input, you set bit 15 of the flags parameter to 1.
Here, the FORMATDATA[X] procedure takes data values from the input buffers and
matches them with data descriptors from the data descriptor list. The first data value is
matched with the first data descriptor, and so on. The format of the data descriptor is
the same as that for format-directed formatting and is shown in Figure 19-3.
Data values provided in the input buffers are usually separated by either commas or
any number of spaces. You can also separate data values using the slash character
(/), which causes all subsequent values to be ignored and treated as null values.
Figure 19-8. List-Directed Formatting
Note. Be sure to terminate the last value in your input buffer with a value-separation character.
Failure to do so causes the FORMATDATA[X] procedure to read beyond your intended input
and either successfully read the wrong data or return error 272 (illegal input character).
VST101.VSD