FORTRAN Reference Manual

Statements
FORTRAN Reference Manual528615-001
7-52
Positional Editing
Do not use an apostrophe edit descriptor on input.
The H Descriptor
The nH edit descriptor causes the n characters (including blanks) that immediately
follow the H to be written to the output record directly from the edit descriptor itself, in
the same way as the characters in an apostrophe edit descriptor are written to the
output device.
You cannot use an H descriptor on input.
Unlike an apostrophe descriptor, adjacent apostrophes in an H descriptor do not have
special significance. If you specify two adjacent apostrophes in an H descriptor, they
are both written to the output device. However, if within a character constant, you use
an H descriptor that contains an apostrophe, you must specify two apostrophes in
succession to enter a single apostrophe in the output record. The two successive
apostrophes count as a single character with respect to n in the nH descriptor.
WRITE(*, FMT = '(13H Eat at Mom''s)')
Positional Editing
The T, TL, TR, and X edit descriptors specify the position at which the next character
will be transmitted to or from the record. On output, these edit descriptors do not, by
themselves, cause characters to be written, and therefore do not affect the length of
the record. If you write characters to positions at or after the position specified by a
positional descriptor, any positions skipped and not previously filled are filled with
blanks. The result is as if the entire record were initially filled with blanks.
The Tn edit descriptor specifies that the nth character position of the record will be the
next one transmitted. The nth character position can be in either direction—forward or
backward—from the current position. On input, the Tn edit descriptor enables your
program to process portions of a record more than once, perhaps using different
editing each time.
The TLn descriptor indicates that the transmission of the next character to or from the
record occurs at the character position n characters back from the current position. If
the current position is less than or equal to position n, the transmission of the next
character occurs at position one of the current record.
The TRn descriptor indicates that the transmission of the next character to or from the
record occurs at the character position n characters forward from the current position.
The position specified by an X descriptor is forward from the current position. On input,
you can specify a position beyond the last character of the record as long as no
characters are transmitted from such a position.