Radio Shack TRS-80 PC-3 Owner's Manual page 208

Table of Contents

Advertisement

2. If you can't find an obvious error in the way in which the line is written, the problem may lie with the values which are being
used. For example, CH R$ (A) will produce an error if A has a value of 1 because CH R$ (1) is an illegal character. Check the
values of the variables in either the RUN or the PROgram mode by typing in the name of the variable followed by
(ENTER).
You R UN the program and don't get an error message, but it doesn't do what you expect.
3. Check through the program line by line using LIST and the
IT)
and
OJ
keys to see if you have entered the program
correctly. It is surprising how many errors can be fixed by just taking another look at the program.
4. Think about each line as you go through the program as if you were the computer. Take sample values and try to apply the
operation in each line to see if you get the result that you expected.
5. Insert one or more extra PRINT statements in your program to display key values and key locations. Use these to isolate
the parts of the program that are working correctly and the location of the error. This approach is also useful for determining
which parts of a program have been executed. You can also use STOP to temporarily halt execution at critical points so
that several variables can be examined.
6. Use TRON and TROFF, either as commands or directly within the program, to trace the flow of the program through
individual lines. Stop to examine the contents of critical variables at crucial points. This is a very slow way to find a pro-
blem, but sometimes it is also the only way.
209

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents