Tutorials

This is a beginners tutorial on Basic that begins at the very start. If your looking for a tutorial or guide to the graphscreen, follow this link

I was inspired to write this guide because I had read too many guides that were either short and didn’t say enough or were unfinished. So as long as you can read English and have 5 to 10 minutes you can learn TI basic. Every one of the programs or lines of code in this guide has been thoroughly tested. Some are even in games made by UberProgs.

First, if your new to this thing, press the on button to turn on the calculator. press the prgm button and then go to the new tab to start a new program, and press 2nd and then mem to go to a memory management screen, where you can delete programs. press program in the new screen to see a list of programming commands in two tabs, the CTL tab and the I/O tab. The more confusing functions will be skipped for now. A variable is the same as the math term, it's a letter that takes place of a number so that it can be changed to be any number.
1.1: the simpler functions in the I/O tab and store.

store is the sto> command and it sets a variable to a defined value, like this. -> is the store command.
12->A

selection 1, Input, asks the user to tell the calculator a number or letter. It works like this.
Input "what you want them to input",variable
an example would be
Input "CENTIMETERS",C

selection 2, Prompt, is like input but is simpler, but you can't describe what needs to be typed.
it works like this. Prompt Variable
an example would be Prompt A

selection 3, disp, is used to display text on the screen, or values, starting in the upper left corner. It works like this.
disp "YOUR TEXT HERE
the well known example would be
Disp "HELLO WORLD
If your message is longer than 16 characters, you will need to use multiple lines, like this.
Disp "THIS MESSAGE IS
Disp "TOO LONG FOR ONE
Disp "DISP COMMAND
it can also display variables and values like this
Disp A

selection 6, output(, is another way of displaying text on the screen, but it uses coordinates. X starts in the top at 1 and goes to the bottom and Y starts at the left at 1 and goes to the right. The screen is 8 by 16 characters, like this.
X
1
2
3
4
5
6
7
8
Y1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

output(X,Y,"YOUR TEXT HERE
output has a text wrapping feature so no need to use multiple output commands here. This is an example
output(4,1,"ONLY ONE OUTPUT COMMAND USED

selection 8, ClrHome, clears the screen of all text. Use it before most text-displaying commands.

1.2: And that's it for the I/O commands. Now the CTL commands.

selections, 1, 2, and 3, If, then and else
the if command checks to see if a condition is true. If it is true, it executes the next command line. If it is false, then it skips the next command line. here's how it works.
12->A
If A=12
Disp "A=12

If you add a then command, you can have multiple commands after the if command. You also need to add an end after the commands.
12->A
If A=12
Then
ClrHome
Disp "A=12
End

If you add an else command, you can tell it to do something if the condition isn't true.
12->A
If A=12
Then
ClrHome
Disp "A=12
Else
Clrhome
Disp "A doesn't equal
Disp "12
End

selection 7, end, defines the end of a set of commands, like in the previous if-then-else commands and in the soon to come lbl and goto commands.

selection 8, pause, pauses the screen so you can look at it without exiting a program. Pressing enter stops the pause command and moves on. Example:
ClrHome
Disp "Paused
Pause
ClrHome
Disp "Not paused

Selection 9, Lbl, defines the following part of the program as part of a label, the set of commands is ended with an end command. This is an example. The characters that define a label are the letters and numbers and theta. There can be one or two characters defining a label. For instance, Z, 3E, 20, AV, or U9 all work. [ would not.
Lbl 1A
ClrHome
output(4,7,"HI
Pause
End

Selection 0, goto, stops whatever the program is doing and scans the program until it finds the label specified, then executes the commands in that label. So if we wanted to do what 1A does from a part of the program later we just put in Goto 1A.

never use selections A and B, they are absolutely useless and are mistakes of programming. I won't even tell you what they do so you can't use them. HA! If you don't believe me, look at the other guides that don't cover them or tell you not to use them.

Selection C, Menu, creates a menu with different things to choose and a title. It works like this. No need for a pause or clrhome when using a menu.
Menu("TITLE HERE","CHOICE 1",label for choice 1 here,"CHOICE 2",label for choice 2 here,"CHOICE 3",label for choice 3 here
Here is an excellent example from an earlier version of my game BATTLE! RPG. I know, the title needs work. I must've had namer's block when I named it.
Lbl CF
Menu("CHOOSE FILE","FILE 1",F1,"FILE 2",F2","FILE 3",F3,"BACK",MM
End
Lbl F1
commands here…..
more commands…..
End
Lbl F2
…….
…….
End
Lbl F3
…….
…….
End
Lbl MM
I leave the end blank so that it quits automatically.

The last command that is covered here, Stop, quits the program and leaves a stupid "DONE" sign at the end. Here is how to use stop and get rid of the "DONE" thingy.
Lbl 1
ClrHome
Output(1,1,"YOU JUST LEARNED TI-BASIC
Pause
ClrHome
Stop
and to get rid of the "DONE" thing, we just do this before the stop.
Output(1,1,"

1.3:That's it for the basics section. To test your knowledge, make a program that uses a startup menu with selections for start and quit, input to have the user input a number, and then if-then-else commands to check if the number equals 1. If it does, tell the user he/she won the game. If not, tell them they lost. Then go back to the startup menu. If you can't do this, read my guide again. If you still can't after that, read another guide, which probably won't be necessary. If you still can't, then you can't ever program in ti-basic. ever. Just kidding, look at this if you really have a problem.

Lbl A
Defines the set of commands as part of lbl A.
ClrHome
Clears the screen.
Menu("GUESS THE NUMBER","START",B,"QUIT",C
Creates the menu.
End
Defines the end of the set of commands under lbl A.
Lbl C
Defines the set of commands as part of lbl C.
Output(1,1,"
Gets rid of the "Done" message.
Stop
Stops the program
End
Defines the end of the set of commands under lbl C.
Lbl B
Defines the set of commands as part of lbl B.
ClrHome
Clears the screen.
Input "NUMBER=",N
Allows the user to input a number and stores it in N.
1->A
Sets the variable A's value to 1.
If N=A
Tells the calculator to only do these commands if N=1.
Then
Tells the calculator that there are multiple commands.
ClrHome
Clears the screen.
Disp "YOU GUESSED
Displays YOU GUESSED.
Disp "CORRECTLY
Displays CORRECTLY.
Else
Tells the calculator what to do if N doesn't equal 1.
ClrHome
Clears the screen.
Disp "WRONG NUMBER
Displays WRONG NUMBER.
End
Ends the set of commands to only do if N=1
Pause
Pauses the screen so that you can look at it.
Goto A
Goes back and executes the commands under lbl A.

No end commands are needed at the end of a program if you want it to quit. The calculator implies them with the program's lack of following commands.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NoDerivs 3.0 License