50
1.
Check
the
test
data
to
be
certain
it
is
punched
(or
typed)
exactly as you
think
it
is punched. This is also
true
for actual
input
data. Keep
in
mind
that
persons
preparing
data
for
your
program
may
occasionally make
common errors peculiar to
the
format you
are
using.
2.
If
possible, have
an
associate
make
a desk check of
your
program, or
if
the
program
was
typed
or
printed
out
when
it
was compiled, check
that
program.
3.
During
the
compilation of
an
object program, a
number
of
tests
are
made
for source program errors.
If
an
error
is found in a source statement, an
error message is
typed
or
printed
and
the
processing continues. You should
determine
if
an error message was
typed
or
printed
out
and
not
noticed
by
the
machine operator.
These
error tests
are
concerned
with
the
viola-
tion of
the
rules for forming expressions
and
statements.
(The
meaning
of
the
error
message is described in
Part
3,
OPERATING
PRINCIPLES.)
4. You
can
make
a
more
thorough
test
of your source
program
by
process-
ing
it
on
the
IBM
FORTRAN
Pre-Compiler program
which
is available from
IBM
upon
request.
The
Pre-Compiler program detects
and
permits cor-
rection of errors
in
a
FORTRAN
source
program
before
it
is compiled.
It
detects
many
of
the
more
common programming errors
and
indicates
possible logical errors
in
the
source program as a whole.
If
you do not
have
time to use
the
Pre-Compiler program, a knowledge of
the
types
of errors which can
be
detected
by
this system
may
help
you to visually
locate errors
in
the
source program.
The
Pre-Compiler
program
is de-
scribed
in
Part
5.
The
Pre-Compiler description contains a list of
51
of
the
most common
programming
errors.
5.
If
you still haven't located
the
difficulty, you can use
the
"trace feature"
of
the
FORTRAN
program.
The
FORTRAN
processor
can
compile certain in-
structions into an object
program
which will
permit
tracing
the
flow of
the
object program
in
order
to check its correctness.
When
the
object
program
is
executed,
the
trace
output
consists of
the
evaluated
left-hand
side of each executed arithmetic statement.
To
use
the
trace feature, you would have to compile
the
program
again
with
the
trace
feature instructions included
and
execute
the
object
program using this feature. Checking
your
program
with
the
trace feature
will help locate
the
errors
in
your program.
The
following illustration
shows
how
the
results of
the
function of x problem
would
look if the
trace feature
had
been
used.
Typewriter Message
ENTER
SUBROUTINES,
PUSH
START
1620
FORTRAN
PRNTR
SUBR
SET
2 11/63
LOAD
DATA
Printer
Output
.Y<:lOOOOOc+Oj
9.00000
.11220000C+04
921.00000
10.00000
1122.00000
-.20970000E+04
15.00000
-2097.00000
-.:'9870000E+04
25.00000
-5YH7.00000
.31700000E+03
5.00000
317.0'0000
Additional information
about
the
trace
feature is
provided
in
Part
3,
OPERAT-
ING
PRINCIPLES.