
7-6
Section
Details of BASIC Commands
229
watch
Syntax:
WATCH
[(
SET
|
DEL
) <variable name>]
Description:
Command. Sets, deletes or lists watched variables in the BASIC debugger. This command can be
used to identify the values of watched variables when the program stopped.
Remarks:
<variable name> must represent a valid variable in the BASIC program that has already had a
value assigned to it. Up to 16 variables can be watched simultaneously. The <variable name>
cannot be specified as an array variable. If an array variable is specified as the <variable name>, a
“NO SUPPORT” error (code 0064) will occur. To monitor array variables, use PRINT array
variables.
WATCH SET
is used to add variables to the watch list.
WATCH DEL
is used to remove variables from the watch list.
If neither
SET
nor
DEL
are specified, the watch list will be listed.
Once the watch variables have been set, the value of the variables will be displayed every time that
the BASIC program is stopped.
After running RUN compile, specify the variables again using the WATCH command.
Examples:
> WATCH SET A$
> WATCH SET B
> 10 A$ = “”
> 20 FOR B = 1 TO 9
> 30 A$ = A$ + STR$(B)
> 40 STOP
> 50 NEXT B
> RUN
BREAK IN LINE 40
A$ = 1
B = 1
> CONT
BREAK IN LINE 40
A$ = 1 2
B = 2
>
See also:
BRKPT
,
CONT
,
STEP
,
STOP
Summary of Contents for C200H-ASC11
Page 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Page 2: ...iv...
Page 4: ...vi...