NET/MASTER Network Control Language (NCL) Programmer's Guide
Debugging an NCL Process From Start to Finish
Debugging an NCL Process
106160 Tandem Computers Incorporated 9–77
Step 10
Display the source code at statement 47, by using the DEBUG SOURCE command, as
shown in the following screen.
Display the values of the variables used to draw the calendar, by using the DEBUG
DISPLAY command, as shown in the following screen. The following table analyzes
the current values of the variables used to draw the calendar:
Variable Value Comment
&DAY 3 Seems correct; it is the third pass through the DO loop.
&DAYS 29 Seems correct.
&FIRST 7 Seems correct.
&LINE “ 2 3 ” Seems correct; it is the second part of the next display line.
&LINELENGTH 35 Is not correct; the length of &LINE is 10 characters, not 35;
the value of &LINELENGTH should be 10.
Stop Perhaps the problem is this: you are using &DAYS, which has a constant value to calculate the value of
&LINELENGTH, whereas the value of &LINELENGTH increases with each day of the month. This
suggests that you should be using &DAY, the loop counter, to calculate &LINELENGTH, not &DAYS.
Modify the value of &LINELENGTH, by using the DEBUG MODIFY command, to the
length of &LINE—the length of the line is currently 10 characters—as shown in the
following screen.
Display the modified value of &LINELENGTH, by using the DEBUG MODIFY
command, as shown in the following screen.