Guardian Procedure Calls Reference Manual (G06.25+)
Formatter Edit Descriptors
Guardian Procedure Calls Reference Manual—522629-013
F-8
Buffer Control Descriptors (/, :)
Buffer Control Descriptors (/, :)
There are two edit descriptors used for buffer control:
/ indicates the end of data list item transfer on the current buffer and obtains the next
buffer. The current position is moved to 1 in preparation for processing the next
buffer.
: indicates termination of the formatting provided there are no remaining data
elements.
•
To clarify, the operation of the slash (/) is as follows for any positive integer n:
•
If n consecutive slashes appear at the end of a format, this causes n buffers to
be skipped.
•
If n consecutive slashes appear within the format, this causes n-1 buffers to be
skipped.
•
The colon (:) is used to conditionally terminate the formatting. If there are
additional data list items, the colon has no effect. The colon can be of use when
data items are preceded by labels, as in the following example:
10(' NUMBER ',I1,:/)
This group of edit descriptors is preceded by a repeat factor that specifies the
formatting of ten data items, each one to be preceded by the label NUMBER. If there
are fewer than ten data items in the data list, formatting terminates immediately after
the last value is processed. If the colon is not present, formatting continues until the I
edit descriptor is encountered for the fourth time. This means the fourth label is added
before the formatting is terminated.
The following example illustrates this usage:
Data Items:
1
2
3
Format:
Results:
With colon Without colon
10('NUMBER
',I1,:/)
10('NUMBER
',I1,/)
With colon Without colon
|NUMBER 1| |NUMBER 1|
|NUMBER 2| |NUMBER 2|
|NUMBER 3| |NUMBER 3|
|NUMBER |