The Beginner for a TI-83 or TI-83+ BASIC programming
By Anonymous
A sequel to The Ultimate beginner for a TI-83 or TI-83+ BASIC programming. This installment discusses commands such as Pause, Goto, Output(, Input, and Prompt.

This is the second lesson. It continues off from the first program you made in lesson 1 (The ultimate beginner for a Ti-83 or TI-83+ BASIC Programming). Here you will learn commands like Pause, Goto, Output(, Input, and Prompt. If you did not read lesson one then go back and just copy the program at the end of the article. Otherwise keep reading. Go to your Program (DAY) and get in the EDIT menu. Scroll down the program till you see both Stop commands. The first thing we will learn is Pause. Go to the first stop command and insert a new line there. To do this make sure your cursor is on the stop command and press 2nd and then INS (DEL). I f you did that right your S in Stop should be blinking. To insert the line press ENTER. A new line should now be inserted over the Stop command and under the word STAYS. Your S should still be blinking so press the up arrow to get out of Insert. You should not be able to see the second stop right now but we need to add a new line there to so scroll down and do the same thing you did to the first one but do it to this one. If you did this correctly your screen should look like this.

PROGRAM:DAY
:
:Stop
:Lbl 2
:Disp “I HOPE IT
GETS”,“BETTER”
:
:Stop

Now we will use the Pause function. Before we do this let me explain what this is. When Pause appears in a program it basically does what it says. It pauses the program. The program will stop until the user (that is you) presses ENTER. To tell whether or not the program is busy or if there is a Pause, look up at the upper right hand corner of the screen. If it is busy lines will seem to move up. If it is Paused then dots will just frantically move. Now that that is taken care of lets put Pause in our program. Scroll up to the new line in the first Stop and press PRGM to see the list of commands. Scroll down to number 8:. There should be a Pause next to it. Press ENTER. Do the same thing for the second new line. Now your screen should look like this.

PROGRAM:DAY
:Pause
:Stop
:Lbl 2
:Disp “I HOPE IT
GETS”,“BETTER”
:Pause
:Stop

Now we will get rid of the Stops because we wont need them anymore. Just scroll to the first Stop and press DEL. The Stop should disappear. Scroll down to the other Stop and press DEL. You should have no Stops in the program now. Now we will put Goto in place of Stop. Again let me explain what Goto is first. It basically serves the same perpose as the numbers or letters in the Menu( function. It tells the calculator which Lbl to go to. Now we will add it in where the Stops were. Scroll to where the first Stop used to be. Get into the list of commands (PRGM) and scroll down to 0:. Goto should be next to it. Press ENTER and Goto should now be where the Stop used to be. We have already used Labels 1 & 2 so now we will use 3. Your cursor should be about 1 space away from the word Goto. If it is, type 3. If it is not, scroll to the word Goto and press the right arrow button. Do the exact same thing for the line that the second Stop used to be. After typing the 3 the second time press ENTER. Your screen should look like this.

PROGRAM:DAY
:Goto 3
:Lbl 2
:Disp “I HOPE IT
GETS”,“BETTER”
:Pause
:Goto 3

Now we will add our Label 3. You should remember how to do this but if you forgot then while on the last line go into the list of commands and scroll down to 9: which should have Lbl next to it. Press ENTER to put it on the last line. Type a 3 next to it so it looks like :Lbl 3 .Now we will learn the Output( function. First do ClrHome so the screen is cleared. Now like always I will first explain to you what Output( is. It will put anything you want anywhere on the screen. It serves the same purpose as Disp except it is one step further. When you use Disp the text will automatically go to the top part of the screen or under another layer of text that was used with Disp. Output( can put that text anywhere on the screen. To know how to do this you will need to know the dimensions of the screen. (You are probably thinking, “Oh man, it was really easy till this part”. Well don’t worry, this isn’t that hard once you get used to it). This is how you would set up Output(. Output(,,“Text”). Seems difficult but it is not. This is your screen. It is 8 spaces tall by 16 spaces wide. Say you wanted to put the letter A in the middle of the screen. You would first think that the middle is half the screen. So what is half of 8? 4 of course. So your would be 4. Half of 16 is 8 so your is 8. Your “Text” would be “A” so this is how your Output( would look. :Output(4,8,“A”). Now we will use Output( in are program by telling it to ask us are age. Go to the list of commands and get in the I/O menu. Scroll down to number 6:. Output( should be next to it. Press ENTER and Output( should be on your screen. We will have What is your age on the last row. The last row is 8 so press 8. Now press comma so we can separate the rows from columns. We want the whole thing to fit so press 1. This tells it to put it in the first column. Now add another comma to separate the columns from the text. Get into ALPHA-LOCK and put in a quotation. Now type WHAT IS YOUR AGE. Add another quotation to end the text. Now put an end parenthesis to signify the end of the Output(. Press ENTER. Just to make sure you got all that here is what your screen should look like.

PROGRAM:DAY
:Pause
:Goto 3
:Lbl 3
:ClrHome
:Output(8,1,“WHA
T IS YOUR AGE”)
:

Now we will use the Input function. This function also does exactly what it says. It is the exact opposite of Output(. Instead of putting something on the screen it takes information the user gives it. In other words, it will answer our question. The user will look at the question WHAT IS YOUR AGE and will type in an answer. What they type in is input. This is the format of Input. Input “text”,. Now lets put it in our program. Go into the list of commands and go over to the I/O menu. 1:Input should already be selected so just press ENTER. Get into ALPHA-LOCK and put in a quotation. Now type AGE? and another quotation. Now the user will give an answer and we need to store this answer to a variable. We will use the variable X. First get out of ALPHA-LOCK and add in a comma. Now to put in a quick variable the calculator uses a shortcut key. When pressed the variable X will always come up unless you are in a different graph mode. Press . An X should appear. Press ENTER. Now we will want to clear the screen so put in a ClrHome.We will now find how far away you are from graduation. Instead of explaining all this, which I just taught you, copy down the following list of commands.

PROGRAM:DAY
:Output(7,1,“WHAT YEAR IS”)
:Output(8,1,“YOUR GRADUATION?”)
:Input “GRADUATION?”,A
:ClrHome

After copying that down Press ENTER. We will now subtract X (your age) from 18 to find how many years you have till you graduate. If you have already graduated it will show you how many years it has been since you graduated. We will use the STORE command to do this. This command allows you to store the answer to an equation to a variable. The STORE command is right above your ON button. It looks like STO->. This is how we would set up ours. 18-X->X. Lets say you were 16. It would be 18-16->X. X would now equal 2. Type this in if you did not already. 18-X->X. Press ENTER. This is the End of Lesson 2. I know, you are thinking, “but we didn’t finish”. To finish this though we will need to know commands like If, Then, and Else. By the way, if you are worrying what Prompt is, don’t. It is the same thing as Imput except it asks you for just the variable. Here is how you set it up. Prompt . Only people that will write Math programs will need to know this. Even then…Input would still probably be better. So don’t fret about Prompt. To finish this program and learn more about programing BASIC for a TI-83 or TI-83+ see my next article “The Intermediate for a TI-83 or TI-83+ BASIC PROGRAMMING ®”. By for now.