Publication 1746-PM001A-US-P
Writing Programs Using the BASIC Development Language
6-7
Breakpoint
The Breakpoint directive inserts a STOP statement into the program when it is
translated. The STOP statement is inserted only if the Debug directive is turned on
{$D+}. When downloaded to the module and executed, program execution halts
when the STOP is encountered. Entering the command CONT (for CONTinue)
resumes execution from where it stopped.
Breakpoints can be used as debugging aids or to allow you to display or modify
variables.
Syntax:
{$B}
Example:
Refer to the example for Debug.
Debug on
Debug off
When the Debug directive is programmed on {$D+}, STOP statements are inserted
at all the Breakpoints {$B} during program translation. {$D+} inserted anywhere in
the program turns Debug on until {$D–} is encountered. The default is for Debug
to be turned off {$D–}.
Syntax:
{$D+} to turn debug on
{$D–} to turn debug off
Example:
Before translation:
After translation:
REM
DEBUGGING
0 REM ...
{$B}
10 REM DEBUGGING
{$D+}
20 IF A>C THEN GOTO 50
IF A>C THEN GOTO GET_C_VALUE
30 STOP
{$B}
40 A=55
A=55
50 STOP
{$L GET_C_VALUE}
60 C=107
{$B}
C=107
In the preceding example, the first breakpoint is not translated to a STOP. This is
because Debug has not been turned on at that point.
IMPORTANT
The Debug directive is not related to the Terminal mode
debugger in any way. In fact, if you use the Terminal mode
debugger (described in Chapter 9), you should
not
use the Debug
directive or the Breakpoint directive. The Debug and Breakpoint
directives are useful for debugging programs from Terminal mode
without using the Terminal mode debugger.
Summary of Contents for 1747-PBASE
Page 1: ...BASIC Development Software Catalog Numbers 1747 PBASE Programming Manual ...
Page 8: ...Publication 1746 PM001A US P Table of Contents vi ...
Page 34: ...Publication 1746 PM001A US P 2 14 Getting Familiar with Your Development Software ...
Page 72: ...Publication 1746 PM001A US P 5 8 Manipulating Files ...
Page 88: ...Publication 1746 PM001A US P 6 16 Writing Programs Using the BASIC Development Language ...
Page 143: ......