The Watchpoint command causes execution to pause at the
line on which an expression becomes true. To create a
watchpoint:
- Type the watchpoint expression in the text box.
- Select .
- Start or continue execution.
- A dialog box appears when the expression becomes true.
QuickC checks each watchpoint expression when you add it
and notifies you if it is illegal. If the expression
includes a local variable, ignore the message. Until you
trace into the function that defines the variable, QuickC
assumes it is undefined.
:p
:nWatchpoint Command (2 of 3)
Watchpoint Expressions
A watchpoint expression consists of base-type variables
(integer, real, pointer) and constants combined with
- Arithmetic operators (+ - * / %)
- Relational operators ( == != > >= < <= )
- Bitwise and logical operators (& | ^ && || << >>)
- Parentheses
- The structure-member (.), structure-pointer(->),
indirection (*), or address-of (&) operator
Constants are treated as decimal numbers unless they begin
with a leading '0' (octal) or 'x' (hexadecimal).
TIP: Remember to use the relational operator ==, not =.
:p
:nWatchpoint Command (3 of 3)
EXAMPLES:
i==100
i==100 || j>10
work.rate * hours >= 1000
Once you have created a watchpoint, it remains in effect
until you delete it. To delete a single watchpoint:
1. Select the watchpoint expression to delete from the
list of current expressions.
2. Select .
To delete all watchpoints, select .