- Double-click on any occurrence of StartPt in the VLISP text editor window. This is the name of the variable whose value you want to track.
- Choose the Add Watch button in the Watch window, or right-click and choose Add Watch.
this process for the variables EndPt and HalfWidth.
Your Watch window should resemble the following:
If a variable does not contain the value you think it should, you can change the value and see how it affects the program. For example, say that you expect the halfwidth value to be a whole number. But because you weren't careful about picking the points during the input selections, you ended up with a value like 1.94818.
- Enter the following at the Console
(setq halfwidth 2.0)
Note that the value in the Watch window changes. But can you be sure the new value will be used when the width sublist (40 . width) is created in the association list? Add one more expression to the Watch window to test this.
- Choose Debug Watch Last Evaluation from the VLISP menu.
- Step through the program (choosing either
the Step Into or Step Over button) until the expression responsible
for building the width sublist
is evaluated. The code for this action is:
(cons 40 (* HalfWidth 2.0))