EasyManuals Logo
Home>IBM>Desktop>1620

IBM 1620 User Manual

IBM 1620
111 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #42 background imageLoading...
Page #42 background image
Printing
Multiple
Lines
with
One
Format
Statement
42
repeatedly (always
returning
to
the
last
open
parenthesis) until all variables
in
the
input
or
output
statement
have
been
processed.
Each
time
the
program
re-
turns to
the
last
open
parenthesis,
the
input
or
output
record is terminated.
In
output
operations, this means
that
a
new
card
or
paper
tape
record is
punched
containing
the
remaining items
on
the
list.
In
input
operations, a
card
or
paper
tape
record cannot contain
more
items
than
there
are
specifications in
the
FORMAT
statement. Thus,
the
input
or
output
statement is completed
when
there
are no
items remaining
on
the
list.
If
there
is a long list of
data
to
be
printed,
the
statement
8
FORMAT
(lHO,F10.6,E10.2, ( 1HO,E8.4,I3 ) )
is
the
same as writing
the
statement
8
FORMAT
(lHO,F10.6,E10.2,E8.4,I3/1HO,E8.4,I3/1HO
...
)
In
this example,
the
first
printed
line would contain
the
first four variables
in
the
PRINT
or
TYPE
list,
with
the
format
of
F10.6, E10.2, E8.4,
and
13.
All re-
, maining variables in
the
list
would
be
printed
on succeeding lines, two to a line,
in
the
format E8.4,
13.
As
explained next,
the
use
of a slash symbol
(/)
as a
special character makes
it
possible to
print
on
more
than
one line.
Single specifications can also
be
used for more
than
one
variable without
creating a
new
record.
For
example
the
statement
24
FORMAT
(13, 3E12.4)
is equivalent to writing
the
statement
24
FORMAT
(13, E12.4, E12.4, E12.4)
This specification would
punch
four variables in
the
same
card
or
paper
tape
record or
print
or
type
four variables on
the
same line.
Care
must
be
taken
when
specifying multiple use of single specifications. so,that
the
maximum length of
the
record
(87
characters
or
121 characters
in
the
printer-oriented system) is
not
exceeded.
For
example,
the
statement
25
FORMAT
(615, 5E12.4/3F10.2)
is
invalid
because
the
first
record
is
specified
as
90
characters
long
( 6 x
5)
+ ( 5 x 12) .
The
number
preceding
the
type
code
(E,
F,
or
1) can only
be
an
unsigned
fixed-point constant.
A list of variables in a
PRINT
or
TYPE
statement can
be
printed
on
more
than
one
line
by
placing a slash
between
the
specifications.
For
example, a list of four
variables with
the
FORMAT
statement
of
6
FORMAT
(lHO,F10.2,F10.2/1HO,E10.4,E10.4)
would
be
printed
with
the
first
two
variables on
the
first line,
and
the
last two vari-
ables on
the
next line.
A
great
deal of flexibility can
be
obtained in specifying multiple-line print-
ing. Consider
the
following statements:
PRINT
3, A,B,
...
,Z
3
FORMAT
(lHO,F9.2,F10.4/1HO,E14.5)
(In
an
actual program,
each
item from A to Z would
have
to
be
listed.)
When
the
output
data
is printed, lines
1,
3, 5
...
have format (F9.2,F10.4),
and
lines
2,4,6
...
have format
(E14.5).
Notice
that
both
the
slash
and
the
closing parenthesis in a
FORMAT
statement

Other manuals for IBM 1620

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM 1620 and is the answer not in the manual?

IBM 1620 Specifications

General IconGeneral
BrandIBM
Model1620
CategoryDesktop
LanguageEnglish

Related product manuals