321
19-3 Debugging a Program
A problem in a program that keeps the program from running correctly is called a
“bug,” and the process of eliminating such problems is called “debugging.” Either of
the following symptoms indicates that your program contains bugs and that debug-
ging is required.
• Error messages appearing when the program is run
• Results that are not within your expectations
uu
uu
uTo eliminate bugs that cause error messages
An error message, like the one shown below, appears whenever something illegal
occurs during program execution.
When such a message appears, press d or e to display the location where the
error was generated, along with the cursor. Check the “Error Message Table” for
steps you should take to correct the situation.
• Note that pressing d or e will not display the location of the error if the pro-
gram is password protected.
uu
uu
uTo eliminate bugs that cause bad results
If your program produces results that are not what you normally expect, check the
contents of the program and make necessary changes. See “Editing File Names
and Program Contents” for details on how to change program contents.
P.399
P.323
P.328