4-6
Error
Messages
and
Debugging
If
an error occurs, specify the WRT mode
by
pressing
~
ITJ
after releasing the
error
by~
key and correct by calling the error line with the LIST command.
2. Debugging When Error Is
Not
Displayed
If
the desired result cannot be obtained
without
any error message displayed,
there
is
a
"bug"
that
does
not
become an error somewhere in the program. In
this case,
d~bugging
is
carried
out
while executing the program.
• Debugging with
the
STOP Command
Since the program execution will pause
if
the STOP command
is
written imme-
diately after the line containing the variable
to
be checked, display and check
the contents
of
the variable by entering variable
to
be checked followed
by
§I
.
To continue executing the program, press
§1.
• Debugging with
the
TRACE Mode
Press
~ ~
and "TRACE ON" will be displayed. This mode
is
called the
TRACE mode.
If
a program
is
executed in the TRACE mode, there will be a
pause after each line (after each
statement
when using multistatements). Press
§I
to
advance
to
the next execution.
The
TRACE mode
is
used
to
find the bug
by
tracing the flow
of
the program.
Pressing
~QI
causes "TRACE ON" to disappear and cancel the TRACE
mode.
Other causes
of
bugs
that
can be considered are "errors in the variable" and
"errors in the subscript
of
an array variable". The program should therefore be
closely checked.
7 1