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, all together, 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 is 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. You will see a list of programs stored in your calculator including EXAMP. Either type the program's number or place the cursor over it and press ENTER. This will put you back on the home screen and prgmEXAMP will have been added 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.
Programs can be deleted from memory by choosing MEM/Delete/Prgm, moving the pointer to the name of the program to be deleted and pressing ENTER. (This process is different on a TI-83 Plus, where you press MEM, then Mem Mgmt/Del, then Prgm and use the Del key to delete a program.)
Programs can be modified (edited) by choosing PRGM/EDIT and then selecting the program to be edited by name. This will place back on the EDIT screen where you can use the arrow keys to move around in the program and make desired changes.