The Immediate Window


[Page 629 (continued)]

While in Break mode, you can set the focus to the Immediate window by clicking on it (if visible), by pressing Ctrl + Alt + I, or by hovering the cursor over "Windows" in the Debug menu and clicking on Immediate. When you type a statement into the Immediate window and press the Enter key, the statement is executed at once. A statement of the form

? expression

displays the value of the expression on the next line of the Immediate window. (The question mark is shorthand for Debug.Print.) A statement of the form

var = value

assigns a value to a variable. In Figure D.2, the variable numVar had the value 10 when the program was interrupted.

Figure D.2. Three statements executed in the Immediate window.





An Introduction to Programming Using Visual Basic 2005
Introduction to Programming Using Visual Basic 2005, An (6th Edition)
ISBN: 0130306541
EAN: 2147483647
Year: 2006
Pages: 164

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net