HP Fortran Programmer's Reference (September 2007)
I/O formatting
Edit descriptors
Chapter 9 239
Edit descriptors
Edit descriptors are encoded characters that describe data conversion between an internal
(binary) format and an external (character) format. There are three types of edit descriptors:
• Data edit descriptors define the format of data to be read or written, such as its type and
width (in characters). All data edit descriptors are repeatable; that is, they can be
preceded by a positive integer that specifies the number of times the edit descriptor is to
be replicated.
• Control edit descriptors specify editing information, such as the number of spaces
between input items, treatment of blanks in input, and scale factors. Of the control edit
descriptors, only the slash (/) is repeatable.
• Character string edit descriptors output text. None of these is repeatable.
All of the edit descriptors supported by HP Fortran are listed in
Table 9-1. As indicated by the syntax descriptions included in the table, the field width
specification (
w
) is optional for all data edit descriptors in HP Fortran. Note that the Fortran
90 Standard defines the field width specifier to be optional only for the A edit descriptor. The
table also identifies which edit descriptors are repeatable and which can be used on input,
output, or both.
Table 9-1 Edit descriptors
Descriptor Type Repeatable? I/O use Function
”...” or '...' Character
string
No Output Output enclosed string.
$ Control No Output Suppress newline at end of
output.
/ (slash) Control Yes Input/output End current record and begin
new record.
: (colon) Control No Input/output Stop formatting if I/O list is
exhausted.
A[
w
] or R[
w
] Data Yes Input/output Convert character data.
B[
w
[.
m
]] Data Yes Input/output Convert integer data, using
binary base.