Intel fortran-80 Laptop User Manual


 
Input/Output
6-20
The
width
of
the field
is
the length
of
the character string.
Example:
WRITE (7,100) ITSTNO
100
FORMAT
('THIS IS THE TEST NUMBER', 2X,
12)
'H'
Descriptor Editing
The
Hollerith field descriptor
is
an
alternate
way
to
perform
the same
operation
as
apostrophe
editing. Like
apostrophe
editing, it
is
used only for
output.
The
'nH'
descriptor causes the In' characters following the
'H'
to
be written
out
(including
embedded blanks).
Because the Hollerith field descriptor relies
on
an
accurate character
count
to pro-
duce the correct
output,
apostrophe
editing
is
likely
to
be less
error
prone
than
this
method.
Example:
WRITE (7,100) ITSTNO
100
FORMAT
(1
H1, 19HTHIS IS TEST NUMBER, 2X,
12)
C FIRST H DESCRIPTOR CAUSES SKIP TO NEW PAGE
'X'
Descriptor Editing
The'
nX'
descriptor indicates
that
the next
character
transferred
to
or
from a record
is
the
character
"n' positions from the
current
record position. On
output,
the effect
is
to insert In' blanks
into
the
output
record.
Example:
WRITE (7,100) ITSTNO
100
FORMAT
(1X, 'THIS IS TEST NUMBER',
2X,12)
C FIRST X DESCRIPTOR CAUSES SINGLE SPACING BY
C INSERTING A
BLANK
AS THE FIRST CHARACTER
OF
CTHE
RECORD
Slash Editing
The
slash
(I)
edit descriptor acts as
an
end-of-record indicator.
On
input, the re-
mainder
of
the
current
record
is
skipped
or,
if
the file
is
positioned
at
the beginning
of
a record, the entire record
is
skipped.
On
output,·
the current record
is
terminated
and
a new record
is
begun.
The
slash
edit descriptor
may
also be used
to
write
an
empty record, which
is
a convenient way
to provide
blank
lines
on
printed
output.
The
comma
that
normally separates
format
specification list items
is
not
required
before
or
after
a slash.
Example:
WRITE (7,100)
100
FORMAT
(1
H1, ' PLAYER AVERAGE'!)
CTHIS
SLASH CAUSES
BLANK
LINE
FOLLOWING
HEADING
WRITE (7,150)
PNAME, AVG
150 FORMAT
(1X,
A12,
4X,
F4.3)
FORTRAN-SO