Watson Imperative Programming Tutorial


Home
Labs
Tutorials
Known Bugs
Schedule
Archive
Members
Contact Information

Window Layout

Below is a screenshot of the Watson Imperative Lab. As you will note, the major sections of the lab are numbered and explained below the image.

  1. Watson Control Bar - The common Watson control bar for all applications. This bar contains all the functions to run an activity and get important information about the lab. The only difference between the Imperative lab control bar and the other labs' bars is that the DONE button does not check to see whether the specific program currently in the code window actually does what the activity was meant to do.
  2. Code Window - This window holds your actual program, and lets you edit the code held there.
  3. Output area - This window shows all output from your program such as the results of the Write and WriteLn commands as well as some error messages. Unlike other imperative languages, input is not handled here, but rather in its own input windows.
  4. Program Control Buttons - Three buttons are used to control the flow of the program. The first button, run, will execute the program sequentially until the program finishes, pausing only for input. The second button, stop, will end your program. This is useful if your program gets into a loop which it cannot normally escape, or you do not wish for the program to finish for some reason. The third button indicates the execution mode. Hitting this button will switch between walk and run mode:
    • Run Mode - In run mode, the program executes just like any other program does.
    • Walk Mode - In walk mode, the program only executes one command at a time, allowing you to follow the execution. It also keeps track of any variables in the variable window. To force the program to execute the next step in the code, hit the WALK button (the RUN button becomes the WALK button when in WALK Mode.
  5. Variables Window - When in walk mode, this window will show you the current value of the variables in your program, at each step. This is very useful for you to actually see what the program is doing each step of the way.

<< Back

Back to Tutorials

Next >>




Home | Labs | Tutorials | Known Bugs | Schedule | Archive | Members | Contact Information

For problems or questions regarding this site or the labs, contact the Watson Project.
Last updated: 10/22/03.