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 #29 background imageLoading...
Page #29 background image
DO
Statements
located
Within a DO
Statement
The
test
value
is
the
value
which
the
index
may
not
exceed. After
the
range
has
been
executed
with
the
highest
value
of
the
index
which
does
not
exceed
the
test value,
the
DO
is satisfied
and
the
program
continues
with
the
first
statement
following
the
range.
In
the
example~
the
DO
was satisfied
after
the
range
was exe-
cuted
with
the
index value
equal
to
the
test value.
In
some cases,
the
DO
is satisfied
before
the
test value is reached. Consider
the
following:
STATEMENT
NUMBER
FORTRAN STATEMENT
I
5 6 7
10 15
20
25
30 35
~o
~5
50
55
I I I
I_
I I I I I I I I
DO
5 K=I 9
3
I
,
I I
I
I i
_L
1 ~
~
5
I I
I
In
this example,
the
range will
be
executed
with
K
equal
to
1,4;
and
7.
The
next
value of K
would
be
10,
but
since this exceeds
the
test value,
the
program
transfers
to
the
statement
following statement 5 after
the
range
is executed
with
K
equal
to
7.
Note
that
after
the
transfer,
the
index
value
K
(10)
was
not
the
same as
the
test
value
(9).
One
or more DO statements
may
be
included
within
the
range
of a DO statement.
When
this is done
the
following rule
must
be
observed:
If
the
range
of a DO statement
(the
outer
DO
statement)
includes
another
DO
statement
(the
inner
DO
statement),
all statements in
the
range
of
the
inner
DO
must
also
be
in
the
range
of
the
outer
DO.
This rule is illustrated
in
the
drawing
below. (Brackets
are
used
to illus-
trate
the
range of a
DO.)
Permitted
Not
Perm i tted
DO
DO
DO
C
DO
DO
DO
DO
C
DO
C
Writing the 1620
FORTRAN
Program 29

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