Fixed Point
Variable
Floating Point
Variable
Considerations in
Naming
Variables
they
can
be
identified
and
referred to
by
the
object program.
When
reading
this
description of variables,
it
is
important
to distinguish
between
the
value
of a vari-
able
and
the
name
of a variable.
(When
using constants,
the
name
and
the
value
of
the
constant
are
the
same.)
For
example,
VOLT
could
be
the
variable
name
assigned to a series
of
values used
in
a calculation of
current
in
a circuit. Variables
may
be
in
fixed
point
or floating point.
Definition:
Example:
A fixed
point
variable
name
consists of from 1 to 5 alpha-
meric characters (i.e., letters A to
Z, digits 0 to
9).
The
first
character
must
be
either
I,
J,
K, L,
M,
or N.
The
value
of
a fixed
point
variable
cannot
exceed 4 digits.
I
JOB 1
MAX
N44
The
requirement
that
a fixed
point
variable
must
begin
with
the
letters I
through
N is because these letters
have
been
arbitrarily chosen to
indicate
to
the
processor
that
the
values of
the
variable so
named
will
be
in fixed point.
Floating
point
numbers
can never
be
the
values for a variable defined as fixed point.
Definition:
Example:
A floating point variable
name
consists of from 1 to 5 alpha-
meric characters (i.e., letters A to
Z,
digits 0 to
9).
The
first character
in
the
name
must
be
alphabetic
(not
nu-
meric)
and
must
not
be
the
letters I
through
N.
(Remem-
ber, I
through
N
are
used
to indicate fixed
point
variables. )
A
B7
DELTA
VOLT
RATEI
The
rules for
naming
variables allow extensive selectivity.
It
will
be
easier for you
to follow
the
flow of a program
if
you use meaningful symbols
wherever
possible.
For
example, to
compute
distance you
could
use
the
statement
but
it
would
be
more meaningful to
write
or
even
DIST
= RATE *
TIME
Similarly,
if
you
want
a computation to
be
performed
using fixed point, you could
write
1=
J * K
Writing the 1620
FORTRAN
Program 15