Goal: We want to be able to enter and run short calculator programs.
Preliminaries: Imagine a sequence of calculator commands that you enter one by one on your calculator. A program is simply the storing of these commands (in a place called the program editor) so that they can be executed later by a single command.
There are some differences between lines executed this way and lines entered one at a time. If your lines entered one at a time consist of a number of numerical computations then the results are displayed after each line is executed. On the other hand, if these same lines are combined in a single program and the program then executed, only the output of the final line will be displayed. For this reason, the calculator offers a special command called Disp, available only for use in a program, which can print results at any desired point during program execution.
There are quite a few other special commands that can be used only from within a program. We will need only a few of these. Later you may wish to explore what else is offered.
Example: Suppose that, in previous computation, a number (3 in the example shown here) has been stored in the x location. Our goal is to enter a program that would combine the effects of computations that, entered as individual lines, would appear as shown on the following screen:
Suppose, also, that you do not care to display the result of the middle line when your program executes.
Here is what those lines will look like as a program (shown as they would appear on the calculator's EDIT screen.)
In this case I have named the program "EXAMP". The name choice is fairly arbitrary. Now we show, step-by-step, the method used to enter that program:
Step by step method:
The program is now entered and ready to run. Store some value in x for the program to act upon.
To run the program: From the home screen, press PRGM and then NAMES. You will see a list of programs stored in your calculator including EXAMP. Press the button indicating the program you desire. This will enter EXAMP at the input cursor's location. Pressing ENTER will execute the program, print the output of the Disp lines and indicate the end with the word, Done. (You can also execute a program by simply typing the program's name on the home screen.)
Programs can be deleted from memory by choosing MEM/DELET/PRGM, moving the pointer to the name of the program to be deleted and pressing ENTER.
Programs can be modified (edited) by choosing PRGM/EDIT and then selecting the program to be edited by name. This will place you back on the EDIT screen where you can use the arrow keys to move around in the program and make desired changes.