Programs can have two kinds of errors, those of syntax and those of logic. The compiler catches the syntax errors; you have to discover the logic errors yourself.
ALT-F3 (Close window): Close all open windows.
F3 (Open File): Load the program code you wish to check.
CTRL-F9: Run the program to ensure that there are no syntax errors. If it does not behave as you had planned, perform parts C and D.
There are three basic commands to check portions of your program. They are useful for different purposes. Check the values of your variables in the Watch Window before and after each time you use one of these commands to see if your variables contain appropriate values or not.
F4 (Run to Cursor): This command is used after placing the cursor on a line of code. The program will be run until this statement is about to be executed. This command can be used to jump to the portion of your program where you suspect the logic problem to be. It can also be used to check a portion of your code which is suspect.
F7 (Trace into [procedures]): This command will single-step through your code, one statement at a time, including entering procedures.
F8 (Step over [procedures]): This command will single-step through your code, one statement at a time, but it will treat a procedure as a single statement by executing the procedure without entering it.
ALT-F5 (Toggle Screen): How your output looks is always important. Whenever a write or writeln is executed, you can have a look at the Output Screen using this command. Since it is a toggle, using it again will take you back to the Source Window.