If you wish to return to the top of this page,
click the little blue arrow thingys that look like this
.
Chapter One: Getting Started
Chapter Two: Variables
Chapter Three: Displaying Stuff and Your First Program
Chapter Four: User Input
Chapters 1-4 Review
Back to tutorial index | Part Two
In this chapter you'll learn how to create a program, edit a program you've created, and run a program.
CREATING A PROGRAM
Press the
[PRGM] key. You should now see
the Program Menu, and it should look something like this.
The list of names (AB2, BRICKOUT, etc.) shows what programs are on your calculator. You might have no items here, you might have a lot. It all depends on what programs you have on your calculator. But what you want to do is press the right-arrow button twice so that NEW is highlighted.
Then your
screen should look like this
.
Press [ENTER] to select item #1,
Create New.
The calculator will ask you for a name for your program. The name must:
For the sake of this program, use the name PROG1. If you don't know how to type this, press [2nd] [ALPHA] [P] [R] [O] [G] [ALPHA] [1].
Then press
[ENTER] to confirm the name.
You should then see the Program Editor screen. It should look like
this:
Boom! Now you're ready to start writing your program.
EDITING A STORED PROGRAM
Now let's say that you want to edit a program that you've written, but you're not in the Program Editor. To edit a program, press [PRGM], then press the right-arrow button so that EDIT is highlighted and press [ENTER]. Select the name of the program you want to edit and press [ENTER]. Now you can edit your program.
RUNNING A PROGRAM
Right now, our program is empty, so nothing will happen when you run it. To run a program that has already been written, press [PRGM]. EXEC should be highlighted. Select the program you want to run and press [ENTER].
EMERGENCY! If you accidentally get stuck in a program that you can't get out of, press [ON] to "break", or stop, your program.
Cool! Now you've mastered the Program Menu. Now you get to learn how to program.
What!? If you don't know, a variable is simply a number, usually represented by a letter (like x or y), whose value can change. Variables are probably one of the most important elements of programming because they can store information. This is particularly handy for storing input from the user, a player's score, or the location of your ship on the screen.
If you still don't understand what this is, take this for an example. Let's say a player's score is 1000 points. We can store the score into a variable, like S, and that number is tucked away and ready for us to use it whenever we want. If we want to display the score, we couldn't tell it to display 1000, because the player's score can change, right? It's not always 1000. So we use a variable, like S, then just tell the calculator to display the score, regardless of what it is.
If you still don't get it, you'll catch on as we go.
STORING A NUMBER IN A VARIABLE
Right now we shouldn't be in the program editor, we should be at the home screen. We're going to put aside programming for a sec.
Let's say you
want to put the number 10 into the variable A. (By the way, the
variables you can use are A-Z and theta O.) This is easier than
you think:
Enter the
number 10. In case you're a complete idiot, press [1] then [0]. After that, we enter
the store symbol by pressing [STO>]. A little arrow
pointing right should appear on your screen. Then enter an A by
pressing [ALPHA] [A]. Finally, press
[ENTER].
The screen
should look like this:
You don't have to put a plain number into a variable. If you wanted, you could do (100+200)/3-90 and put it in A.
Now the number 10 is in A.
DISPLAYING A VARIABLE
Now let's say you want to display what's in the variable A. To do that, simply enter the name of the variable (A) and press [ENTER].
DOING MATH WITH VARIABLES
If you wanted to know what A+2 is, you can simply enter A+2 and press [ENTER]. You should get 12. In fact, you can use a variable just like any other number.
So let's say you want to know what A*3+100 is. Just enter A*3+100 and press [ENTER]. Wanna guess what the answer is? It's the same as 10*3+100.
Here's the
answer.
In fact, you
can even perform math on variables and put the result back into
another variable, or even the same variable! So you could do
A*3+100->B or Q2->X
or
W+70->W or anything else your
little mind can think of.
NOTE: When I tell you to type
"->", I want you to type
the store symbol (by pressing [STO>]), not a minus sign and
a greater than sign.
There are other kinds of variables, like lists, strings, and matrices, that can store more than just 1 number. We'll get to those in a later chapter.
Now, you get to learn how to display stuff on the screen, and you finally get to write a program!!!
Now, finally, you're gonna write a program. I promise.
Step 1. Get into the Program Editor and open up our program PROG1.
HOW TO USE THE PROGRAM EDITOR
OK. Take a look at your screen. At the top you see the name of your program, and then on the next line you see a colon. Each colon represents one command line. A command line is simply one command. Each command has its own semicolon.
If you want to enter a command, you don't have to type out the whole word. You just have to pick it out from a list. Pressing [PRGM]. from within the Program Editor brings up a big menu with lots of commands, divided into 3 sections, CTL (Control), I/O (Input and Output), and EXEC (Execute). In addition to all these commands, you can use any other command you want from any of the other menus.
You'll catch on as we go.
ENTERING A COMMAND INTO THE PROGRAM EDITOR
To enter a command into the program editor, select it from a menu. Press [PRGM]. You'll see a menu of commands. If you want to enter the command Disp, press the right-arrow to highlight the PRGM I/O menu, then select Disp by highlighting it with the arrow keys and pressing [ENTER] or by pressing its number (3).
If you're lost,
here's a picture of the menu.
.
From now on, I will tell you how to get to each command in the menu by telling you what keys to press. Here's an example for Disp: PRGM \ I/O \ 3. This means it's in the PRGM I/O menu, and it's item number 3.
CLEARING THE SCREEN
This is probably one of the most important commands ever. To clear the screen, use the ClrHome command. This can be found at PRGM \ I/O \ 8. After you've got that in your program, press [ENTER].
DISPLAYING STUFF ON THE SCREEN
Yes, now we're going to learn another command, Disp. This command tells the calculator to display something on the screen. But you have to tell it what to display. It can display a number, a variable, text, or many things. Consider the following uses:
Disp 1 ----- Display a number
Disp A ----- Display a variable
Disp A+2+B ----- Display an expression
Disp "HELLO" ----- Display text
Disp "HELLO","1 PLUS 1 IS",1+1 ----- Display multiple things
Now that you know how to use the Disp command, you can put it in the program editor.
After that, let's say you want to display the word HELLO. To do this, simply type [2nd] [ALPHA] ["] [H] [E] [L] [L] [O] ["]. Then press [ENTER] to start a new command line.
ENDING A PROGRAM
The command that ends a program is Stop. If the calculator encounters a Stop anywhere in your program, it immediately ends the program. Stop is PRGM \ CTL \ F.
This command is optional but it's good to have.
YOUR PROGRAM!
OK, so add a Stop to your program. You should know how. After you did that, you're program's done! If done correctly, your screen should look like this:

RUNNING YOUR PROGRAM
Press [2nd] [QUIT] to exit the editor. Press [PRGM] and select your program from the list. Press [ENTER] to run your first program! Here's what it should look like:

CONGRATULATIONS, YOU WROTE YOUR FIRST PROGRAM! NOW YOU CAN SHOW ALL YOUR FRIENDS AND BRAG ABOUT HOW YOU KNOW MORE ABOUT THE TI-83 THAN THEY DO! EXPERIMENT WITH SIMPLE CLEAR-THE-SCREEN-AND-DISPLAY-TEXT PROGRAMS FOR A WHILE UNTIL YOU'RE COMFORTABLE WITH THAT.
All right. Now that you know about output (displaying stuff on the screen), it's time to learn about getting input from the user.
SIMPLE INPUT - THE Prompt COMMAND
The simplest way of getting input is the Prompt command. Its menu location is PRGM \ I/O \ 2.
It is used in this way: Prompt variable(s)
Examples: Prompt A, Prompt X,Y,Z
What Prompt does is that it asks the user to enter a value for a variable or variables.
Here is a little program using Prompt that asks the user to enter a number and it displays the number.
:ClrHome
:Prompt X
:Disp "X IS:",X
:Stop
MORE COMPLICATED INPUT - THE Input COMMAND
Sure, Prompt is OK if you like that X=? message, but what if you want to display a custom message? Or maybe no message at all? Use the Input command. Its menu location is PRGM \ I/O \ 1.
It can be used in one of these ways: Input variable, Input message,variable
Examples: Input X, Input "ENTER A NUMBER",N
Input asks the user to enter a value, but instead of the prompt being X=?, the prompt can be a custom message, or no message (just a question mark).
Here is the same progam as above, but a bit "friendlier":
:ClrHome
:Input "ENTER A NUMBER: ",N
:Disp "YOUR NUMBER WAS",N
:Stop
Here is the
output of that program:
Let's see what we've learned. Create a program and name it AVERAGE.
THE AVERAGING PROGRAM
This program will ask for three numbers and display the average of the three. The numbers will be stored in A, B, and C, and the average will be M.
:ClrHome
:Disp "ENTER 3 NUMBERS"
:Prompt A,B,C
:A+B+C->M
:M/3->M
:Disp "THE AVERAGE IS:",M
:Stop
If done
correctly, the output of your program should look like this: