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 #19 background imageLoading...
Page #19 background image
Rules
for
Forming
Expressions
There
are five rules
that
you
must
follow
when
you write
FORTRAN
arithmetic state-
ments.
The
purpose
of these rules is to
help
you
write
your
statement
correctly
in
FORTRAN
language.
l.
The
constants
and
variables
used
in
a
FORTRAN
expression may
be
either
in
fixed
point
or
floating point mode,
but
both
modes cannot
be
used
in
the
same expression.
For
example:
426
3.
I
R
HRS (J)
Constant
- fixed
point
mode
Constant
- floating
point
mode
Variable - fixed
point
mode
Variable - floating
point
mode
Subscripted variable - floating
point
mode
In
the
last example,
the
subscript
J,
used
with
the
floating
point
variable
HRS,
is
in
fixed
point
mode.
The
mode
of
the
expression is
determined
only
by
the
mode
of
the
quantity. Using a fixed
point
subscript
with
a floating
point
variable does
not
violate
the
rule of mixing modes
in
an expression.
2.
Involution of a
quantity
does
not
affect
the
mode
of
the
quantity. However,
a fixed
point
quantity
may never
be
given an exponent.
The
following
are
valid.
A**B
A**J
floating
point
floating
point
3.
Whenever
two operation symbols follow in succession,
they
must
be
sep-
arated
by
parentheses.
The
following examples illustrate this rule:
Ma
thema
tical
FORTRAN
Incorrect
FORTRAN
Expression Expression
Expression
A
AI
(-B)
AI-B
-B
AB
or
A.
B
A*B
AB
AE+Z.
A * *
(E
+
2.)
A**E+2.
AE+2·B
A * *
(E
+
2.)
*B
A**E+2.*B
Common algebraic rules must also
be
observed.
For
example
the
ambig-
uous mathematical expression
C
A
R
can
be
written
as R * *
(A
*
*C)
or as
(R
* *
A)
* *C, whichever
it
is
intended
to be.
The
mathematical
expression
AB
CD
can
be
correctly
written
as
A*B/(C*D)
or as
A/C
*
BID.
But
the
ex-
pression A
*B/C*D,
although
it
is a
valid
FORTRAN
expression, does
not
represent
the
mathematical expression
AB
.
CD
Writing
the
1620
FORTRAN
Program 19

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