HP Fortran Programmer's Reference (September 2007)

I/O formatting
Edit descriptors
Chapter 9 245
Examples of the use of character edit descriptors on input are provided in Table 9-5. In the
table,
b
represents a blank and
z
represents a Null.
Table 9-4 Contents of character data fields on output
Descriptor
Width/length
relationship
Result
A width <= length Data is taken from leftmost
characters in the field.
width > length Output the value, preceded by
blanks.
R width <= length Data is taken from rightmost
characters in the field.
width > length Output the value, preceded by
blanks.
Table 9-5 A and R edit descriptors: input examples
Descriptor Input field Variable length Value stored
A3 XYZ 3 XYZ
R3 XYZ 4
z
XYZ
A5 ABC
bb
10 ABC
bbbbbbb
R9 RIGHTMOST 4 MOST
R8 CHAIR
bbb
8 CHAIR
bbb
R4 CHAIR 8
zzzz
CHAI
A4 ABCD 2 CD