Download AlphaBASIC PLUS User`s Manual

Transcript
Page 4-2
Chapter Four
READY
RUN RETURN
Break at line 40
PRINT A RETURN
5
Here the value of the variable A is 5 before line 40 is executed. If your program is not
giving you the answer you expect, you can use breakpoints at key points in your
program to determine where the calculations are going wrong.
You can also change the value of a variable. Say in the example above you wanted the
value of A to be 4. By entering as a direct statement A = 4, you can change the value
for the duration of the program run.
There is no limit to the number of breakpoints that may be set in one program. The
program doesn’t run any slower with breakpoints in it than normally.
Compiling a program does not clear breakpoints. If you want to see what breakpoints
are set, enter BREAK:
READY
BREAK RETURN
No breakpoints set
READY
BREAK RETURN
30
60
You may start the program over again by using the RUN command; it again breaks at
the first breakpoint set.
4.2CONTINUING AN INTERRUPTED PROGRAM (CONT)
CONT, which stands for "continue," causes a suspended program to continue execution
from the point at which it suspended. You may suspend a program by using a BREAK
command prior to program execution or by using a STOP statement within the program.
You may not continue a program after it has finished. The following is an example of
CONT after a STOP statement has suspended a program:
Program stop in line 700
READY
CONT RETURN
The program continues by next executing the first line numbered higher than line 700.
CONT also continues a program which you have partially executed using the single-step
feature (see below).
AlphaBASIC PLUS User’s Manual, Rev 02