Previous Topic Next topic Print topic


Stepping Through the Program

The source code is initially displayed with the cursor positioned under the first executable statement:

perform with test after

One of the letter commands on the Animate menu is Step.

  1. Press Step to begin stepping through your program.

    The cursor is now positioned under the next executable statement:

    call clear-screen 
  2. Press Step.

    This executes the CALL statement, and leaves the cursor on the next statement.

  3. Press Step.

    This executes the DISPLAY statement, and leaves the cursor on the next statement.

  4. Press F2=view.

    The user screen is the screen displayed by the program itself, that is, the screen that would be seen by the user if you were running the program without Animator. The screen showing the source is called the Animator screen.

    The CALL statement executed a library routine that cleared the user screen, and the DISPLAY statement then displayed some text. You can now see the user screen with that text:

    To select a square type a number between 1 and 9

    You can use the view facility to view the user screen at any time during animation.

  5. Press any key to return to the Animator screen.
  6. Now execute the next three statements in the program by pressing Step three times.

    Each time you press Step another statement is executed, and you can see what is actually happening in the program.

Previous Topic Next topic Print topic