Programming is a very demanding task, and it requires a special kind of person. Most people who try their hand at programming decide that it is either too much work, too boring, or a combination thereof. Fortunately, these people are the ones you don't want to be programming, so it all works out.
Assuming you are not one of those people, there are a few key indicators that tell you whether you are cut out to be a programmer. The first indicator is your mental aptitude. Do you enjoy solving problems and puzzles — for example, a complex math problem — and do you like the more technical things? Programming at its core is about solving problems and figuring things out, so if you don't have the right mental aptitude, then programming probably isn't for you.
Related to the first indicator, the second indicator is your willingness to work through difficult problems and figure things out. This skill requires a very dedicated, almost obsessive person who is transfixed on the problem. Even if you don't know something, you need to be comfortable with that feeling, and still be able to rationally research a solution to the problem.
The third indicator is your passion for learning and growing. Do you spend hours at a time reading and researching in books and documentation? When you see highquality programs and games, does that make you want to dissect the program to find out how it works? Passion is often what drives you to keep pushing to the next level, and without it, you will almost be guaranteed to just get tired and give up.
All three of these indicators — aptitude, persistence, and passion — are vitally important to any successful programmer. We all face challenges and difficulties, but we overcome them using those different things. If you only have two of the three indicators, you can still be a decent programmer, but you won't be as complete a programmer as you could be.
You've just completed your first major program. It is a TI83+ TIBasic rendition of the classic game, GuessTheNumber. You've spent what seems like hours making it. You know that it isn't anything fancy, but you are proud of it, and you want to release it to the public. So, you just write up some quick documentation, and it's ready for release. Or, so you believe… The truth is that there is a lot more to releasing a program than that.
On a calculator with limited memory and speed, people only want to keep something if it is worth it. If your game is original, fun and optimized, then people will want to keep it on their calculators. The more likely scenario, however, is that there are several similar programs already released, and chances are that those programs are just like yours: same graphics, same gameplay, and same slow loadup time. You have to ask yourself then — What makes my program different from the competition? If you are honest with yourself, you will have to say there is nothing different between the two!
Making it Stand Out
If you want your program to stand out from the other duplicate programs, you will need to make it apparent to the user. Users often see several different variants to the same program, and it becomes extremely hard to separate the good ones from the bad ones. Making your program stand out not only includes making your program original and fun, but also optimized.
The goal of this guide is not to show you how to make your program original and fun. Just let your creativity run wild, and you can come up with an endless supply of ideas. After that, you just start programming those ideas into your program. If you have trouble coming up with ideas on your own, the other thing you can do is look at programs on the Internet. There are countless online programs just waiting to be ported to the TI83+ calculator. Of course, you will have to adapt them to the smaller screen.
What I am going to discuss in this guide is how you can take your program and transform it into its extreme form. What I mean by extreme is making your program as optimized as possible. You can define an optimized program as a program that is both small and fast, efficient as possible. Ideally, all of the programs you make should be optimized; it should be the standard.
For demonstration purposes, we are going to use the game that I mentioned above: guessthenumber. We will go through all of the optimization steps, changing the game accordingly. The final result will be an extreme version of guessthenumber.
The Original Code
Below is the code of the original version of the guessthenumber game. It is a 1Player game, with the person having to guess the number until they finally get it. The game is played on the home screen. It features a high score that keeps track of the lowest amount of guesses it takes the person to get the number. It also features a counter that tracks how many of your guesses are high and how many of them are low. It will even tell you which one won. The game is programmed the way a beginner would program it. It is your standard TIBasic guessthenumber game found on ticalc.org.
(NOTE: This game has no optimizations done to it in any way.)
:ClrHome
:0→T:0→A:0→C
:randInt(1,10000)→B
:1→dim(∟HIGH)
:If ∟HIGH(1)=0
:20→∟HIGH(1)
:Disp "Guess The Number"
:Disp "Range Is 110000"
:Lbl AA
:Input "Guess: ",A
:T+1→T
:If A>B or A<B
:Then
:If A>B
:Then
:Disp "Too High!"
:C+1→C
:End
:If A<B
:Then
:Disp "Too Low!"
:C1→C
:End
:Else
:Disp "","Good Guess!"
:If ∟HIGH(1)>T
:Then
:T→∟HIGH(1)
:Disp "New Record!"
:End
:If C>0
:Then
:Disp "High Wins!"
:End
:If C<0
:Then
:Disp "Low Wins!"
:End
:Disp "It Took You",T
:Disp "Tries!"
:Pause
:ClrHome
:Stop
:End
:Goto AA
Basic optimizations
When you are starting the process of optimizing your programs, you want to begin with the basic optimizations. One of the first things that you can do is remove closing parentheses, braces, and quotation marks. These things are unnecessary in most cases. The one rare instance where you would want to keep the closing parentheses is when you are dealing with order of operations. For example, when the command is in a list of arguments for an expression or a function.
In our guessthenumber game, there exists several places where we can remove the closing parentheses, braces, and quotation marks. You can remove the closing parentheses on the randInt(1,10000). The store (→) statement closes it, so no closing parentheses is needed. You can also remove the closing parentheses on the dim(∟HIGH) statement and the two ∟HIGH(1) statements.
If you look at the statement If ∟HIGH(1)=0, you can see that it contains the potential to have its closing parentheses removed. You need to first rearrange the statement, switching the ∟HIGH(1) with the 0. The closing parentheses can now be removed, and the result is 0=∟HIGH(1. You can do the same thing with the If ∟HIGH(1)<T statement.
The last thing that you can remove is all of the closing quotation marks on the Disp commands. If you reached the fifth and second to last Disp commands you probably noticed that they have a different syntax than the other Disp commands.
One of the unique attributes of the Disp command is that you can link them together. You just put a comma after the quotation marks for every Disp command that you want to link. You can link both text and variables. In our case, we are linking a variable to text. Just remember that the Disp commands inside the chain need both of their quotation marks. Linking Disp statements won't save you any space, though. In fact, if you hook all of your Disp commands together it can become hard to read the code. It is only recommended when it doesn't hinder readability.
One other thing that you can remove is multiplication signs (*). The calculator does implicit multiplication, so they are never needed. Our program doesn't have any multiplication in it, so this optimization isn't applicable.
Besides removing closing parentheses, braces and quotation marks, and multiplication signs, you can also change all of your text to uppercase letters. Making your text look nice comes with a price. Lowercase letters are two bytes each instead of one byte like uppercase letters. This can really be costly if your program has a lot of text in it. You can't even store to lowercase letters, either. Whether you use them or not is your choice. We aren't going to use them in our guessthenumber game, though.
You also want to make sure to keep your label and list names as short as possible. Ideally, you only want to make them one character in length. This is not always the case, however. When you are first programming your program it helps to know what data your lists hold, and you can do that by using longer list names. When you release your program, though, you want to make sure to shorten them. Applying this optimization to our game, we can change ∟HIGH to ∟H and Lbl AA to Lbl A. It is now 4 bytes smaller for each occurance.
:ClrHome
:0→T:0→A:0→C
:randInt(1,10000→B
:1→dim(∟H
:If 0=∟H(1
:20→∟H(1
:Disp "GUESS THE NUMBER
:Disp "RANGE IS 110000
:Lbl A
:Input "GUESS: ",A
:T+1→T
:If A>B or A<B
:Then
:If A>B
:Then
:Disp "TOO HIGH!
:C+1→C
:End
:If A<B
:Then
:Disp "TOO LOW!
:C1→C
:End
:Else
:Disp "","GOOD GUESS!
:If T<∟H(1
:Then
:T→∟H(1
:Disp "NEW RECORD!
:End
:If C>0
:Then
:Disp "HIGH WINS!
:End
:If C<0
:Then
:Disp "LOW WINS!
:End
:Disp "IT TOOK YOU",T
:Disp "TRIES!
:Pause
:ClrHome
:Stop
:End
:Goto A
The next optimization that we will employ is using the calculator's builtin keys, characters and functions. Whether you know it or not, the calculator contains several useful keys, characters and functions just waiting to be used. For example, you can use the e^( key rather than typing out e^. This is the same for the squaredsign ( ^{2} ) key, the cubedsign ( ^{3} ) character, the 10^( key, the inversesign ( ^{1} ) key, and the E exponent.
The E character is used mainly for scientific notation. It is the only character that our game can use. In our code there exists one instance where we have the number 10000. Using the E, we can replace 10000 with E4.
In addition to learning the calculator's builtin keys, characters and functions, it is also to your benefit to learn the syntax of the commands and their arguments. Several commands have optional arguments that you will only learn about if you read the manual. One such command is Pause. The Pause command can take either a variable or text for its optional argument. What it allows you to do is take text or a variable from the last Disp command and put it as the optional argument. This allows you to delete the last Disp command. Doing this shrinks our program by one byte.
If you start using the manual when you are programming, it will really benefit you. You can use it for whenever you have a question about some command or function. In fact, you should use it as much as you possibly can. Read it until it's in your brain.
When dealing with variables, there's a shortcut to setting the variable to zero. Instead of 0→X, you can use DelVar X. The calculator automatically sets the variable to zero the next time that it is used. In addition, the DelVar command doesn't need a newline/colon following the variable name. This allows you to make chains of variables, with the last variable having the statement from the next line coming immediately after it. In terms of our game, we can use this optimization at the beginning. We have three variables that we set to zero at the game's start. We can use DelVar with each of them, and we can attach the randInt(1,E4→B statement to the end. This eliminates the line that randInt(1,E4→B is on.
:ClrHome
:DelVar TDelVar ADelVar CrandInt(1,E4→B
:1→dim(∟H
:If 0=∟H(1
:20→∟H(1
:Disp "GUESS THE NUMBER
:Disp "RANGE IS 110000
:Lbl A
:Input "GUESS: ",A
:T+1→T
:If A>B or A<B
:Then
:If A>B
:Then
:Disp "TOO HIGH!
:C+1→C
:End
:If A<B
:Then
:Disp "TOO LOW!
:C1→C
:End
:Else
:Disp "","GOOD GUESS!
:If T<∟H(1
:Then
:T→∟H(1
:Disp "NEW RECORD!
:End
:If C>0
:Then
:Disp "HIGH WINS!
:End
:If C<0
:Then
:Disp "LOW WINS!
:End
:Disp "IT TOOK YOU",T
:Pause "TRIES!
:ClrHome
:Stop
:End
:Goto A
Using the calculator's builtin keys, characters and functions only saved us two bytes. If you add in using the Pause command's optional argument and deleting the last Disp command, as well as changing the variable storages to DelVar and moving the randInt( to the end, we saved 7 bytes total. The memory saved may not seem like much, but it is still good practice to always incorporate as many optimizations in your programs as possible.
We now move on to the reorganization and elimination optimizations. You want to try to reorganize your code to eliminate redundant or unnecessary commands or text. If you notice in our game, it doesn't matter what the A variable's initial value is. The user's input will change the A variable's value before any of the conditionals, so we can get rid of the DelVar A command without the game being affected.
One of the first places to look for reorganizations is conditionals. When your conditionals are in the form If X≠0 or If X=0, they can be replaced with If X and If not(X, respectively. They mean the same thing because the calculator checks if X isn't zero in both of the first conditionals and if X is zero in both of the second conditionals. Our game has an If 0=∟H(1 conditional, which can become If not(∟H(1.
Conditionals that have a Then and an End statement can also be optimized. If the conditional only has one nested line, you don't need to include the Then and the End. This optimization is applicable in our game for two of our conditionals. We can apply it to the If C>0 conditional and the If C<0 one.
If the conditionals are opposites and they have two or more nested lines you would not want to remove both of the Then and End statements. Instead, you can remove the first End statement, the second conditional, and the second Then statement, and replace them with an Else statement placed after the nested lines of content of the first conditional. The reason is that only one of those conditionals can be true at any time, so we don't need to do two checks. We can do this with the If A>B conditional and the If A<B conditional. This makes the conditionals five bytes smaller.
The last conditional that we can optimize is If A>B or If A<B. This is a compound conditional, where multiple conditions have to be met in order for it to be true. The goal of the game is to have A=B. The opposite of this condition is A≠B. Looking at our compound conditional, we can see that it really means when A isn't equal to B. It can therefore be replaced with the If A≠B conditional.
The last elimination optimization is not really noticeable unless you are looking for it. Notice how I mentioned above about eliminating redundant or unnecessary commands or text? Well, if you look at the two text phrases "Too High!" and "Too Low!", you can see that they can be replaced with the shorter text phrases "Lower!" and "Higher!". Whenever you are writing text, you should always look for ways to reword or shorten it.
:ClrHome
:DelVar TDelVar CrandInt(1,E4→B
:1→dim(∟H
:If not(∟H(1
:20→∟H(1
:Disp "GUESS THE NUMBER
:Disp "RANGE IS 110000
:Lbl A
:Input "GUESS: ",A
:T+1→T
:If A≠B
:Then
:If A>B
:Then
:Disp "LOWER!
:C+1→C
:Else
:Disp "HIGHER!
:C1→C
:End
:Else
:Disp "","GOOD GUESS!
:If T<∟H(1
:Then
:T→∟H(1
:Disp "NEW RECORD!
:End
:If C>0
:Disp "HIGH WINS!
:If C<0
:Disp "LOW WINS!
:Disp "IT TOOK YOU",T
:Pause "TRIES!
:ClrHome
:Stop
:End
:Goto A
We can further optimize our conditionals by making use of the Ans variable. The Ans variable is a temporary variable that changes every time you store something. It can hold any variable or any text. It is the fastest variable on the calculator. It is mostly useful when you are just manipulating one variable.
In our case, we will use it for holding text. Looking at both text phrases, High Wins! and Low Wins!, we see that they share two common elements: the word "Wins" and an exclamation point. The only thing that changes is the High and Low text. We can take advantage of this, and put the text in the Ans variable. If you noticed, the text phrases Lower! and Higher! also share two common elements: the letters "er" and an exclamation point. The Ans variable won't work here, though, because they are each contained within their respective conditionals. We will come back to them later.
To store anything in the Ans variable you just have to put it on a line by itself. We will put "High on the first line, the If C<0 conditional on the second line, and "Low on the third line. How this works is the Ans variable will contain the text "High, but if the If C<0 conditional is true the text "Low will be in the Ans variable instead. In order to complete the optimization, we will have to get rid of the first Disp statement and change the second one. Our Disp statement will now look like this: Disp Ans+" Wins!. The Wins and the ! are constant, while the Ans variable will change depending on the value of the If C<0 conditional. We will also have to get rid of the End after the Disp statement. Try to use the Ans variable as much as possible.
Using the Ans variable has an unexpected consequence on our If C<0 conditional. What if C is neither greater than zero or less than zero? High Wins! will be displayed on the screen because it is the text that we first stored into Ans. To fix this problem, we need to put an If C≠0 conditional on the line before the Disp statement. This can further be optimized to If C because of the optimization mentioned 8 paragraphs above.
Another way that you can optimize your program is aesthetically. If you run our game, you will notice that Done is displayed on the screen after you exit. This doesn't look very good. To get rid of the Done, you need to have an Output( statement as the last displaying command; there can be no Disp or ClrHome command after it. The Output command does not need to be the last line of code, though. You can do the same thing with erasing the run indicator on the graph screen by using Text(90,0," . This makes your program look very professional.
:ClrHome
:DelVar TDelVar CrandInt(1,E4→B
:1→dim(∟H
:If not(∟H(1
:20→∟H(1
:Disp "GUESS THE NUMBER
:Disp "RANGE IS 110000
:Lbl A
:Input "GUESS: ",A
:T+1→T
:If A≠B
:Then
:If A>B
:Then
:Disp "LOWER!
:C+1→C
:Else
:Disp "HIGHER!
:C1→C
:End
:Else
:Disp "","GOOD GUESS!
:If T<∟H(1
:Then
:T→∟H(1
:Disp "NEW RECORD!
:End
:"HIGH
:If C<0
:"LOW
:If C
:Disp Ans+" WINS!
:Disp "IT TOOK YOU",T
:Pause "TRIES!
:ClrHome
:Output(1,1,"
:Stop
:End
:Goto A
Our program now has all of the basic optimizations done to it. This is where most people would stop with optimizations, and just release their program as is. The truth is that there are more optimizations to be done. Granted, these optimizations require more work than we put into the basic optimizations. It's worth the work, though.
Advanced optimizations
Advanced optimizations involve changing your program in radical ways: changing conditionals into their Boolean form, rearranging and restructuring loops, and even completely redoing your program, if necessary. They can change the whole design and complexity of your code.
Changing conditionals into their Boolean form requires knowledge of equality tests. Putting X=3 into your calculator returns either 1 or 0 depending on the value of X. We can use this same principle in our conditionals. Say we have If X=3:Y+1→Y. We can get rid of the If statement and put parentheses around the X=3 statement and then put it in the place of the 1 — Y+(X=3)→Y. The reason that this works is that when the X=3 statement is evaluated, and it is true it will return 1 and then add that value to Y. You can also keep the 1 and put it in front of the X=3 statement. Or, if you want to, you can change the 1 into another number. It will just add that number to Y instead.
We can use this optimization in our game. It may not seem apparent, but every time the calculator goes through the loop and checks if A>B, it adds 1 to C if the conditional is true. It does the exact opposite when it checks if A<B: it subtracts 1 from C if the conditional is true. Noticing this, we can combine the two C conditionals into one by using their Boolean form. When A>B is true C is incremented by 1, so we should have that as one of the conditions. In similar fashion, when A<B is true C is decremented by 1, so we should have that as one of the conditions. Our conditional now looks like C+(A>B)(A<B→C. This is as optimized as it can get. You will have to move it outside next to the T+1→T statement now because it gets updated every time through the loop.
Changing the conditional into its Boolean form has now allowed us to optimize the two conditionals that we couldn't optimize before. We can repeat the same process that we did with the High/Low Wins! conditions. Our Disp statement will be Disp Ans+"er!.
In addition to changing your conditionals into their Boolean form, you also want to make your loops as compact as possible. You only want your loops to contain things that are dynamic, things that change within the loop. If something only happens once, then you should put it outside the loop. In addition to things that don't change, you want to cut down on the number of storages you make inside your loops, keeping in mind how often certain variables are used and what they are used for. Compacting your loops may take some ingenuity on your part. Ultimately your goal is to make your loops only have the necessary commands inside of them, and nothing more.
If you look at our guessthenumber game, you can see that the loop in it could indeed be made more compact. Every time through the loop, the calculator has to pass through the end game text. This text is only displayed once, when you guess the number. It, therefore, should be placed outside the loop.
After moving the end game text to the end of the code, we now need a way to get to it. We will have to make a respective label (Lbl B) for the text, and put in a conditional (If A=B) that checks to see if the number is guessed, sending the calculator to that label if it is. In addition, we need to remove the If A≠B conditional because it no longer applies. We also need to add a conditional before the Disp Ans+"er! statement, to check if the user hasn't guessed the number yet. Doing this doesn't make the code any smaller, but it does increase the speed of the loop.
Now that the end game text is at the end of the code, we no longer need the Stop command. If possible, it is always preferred to have your programs exit naturally. If you can't make your programs exit naturally, use the Return command instead of the Stop command. The Return command returns the user to the program that they called their current program from, while the Stop command exits the program and returns the user to the home screen. This is usually not want is desired by those that use your program.
:ClrHome
:DelVar TDelVar CrandInt(1,E4→B
:1→dim(∟H
:If not(∟H(1
:20→∟H(1
:Disp "GUESS THE NUMBER
:Disp "RANGE IS 110000
:Lbl A
:Input "GUESS: ",A
:T+1→T
:C+(A>B)(A<B→C
:"LOW
:If A<B
:"HIGH
:If A≠B
:Disp Ans+"ER!
:If A=B
:Goto B
:Goto A
:Lbl B
:Disp "","GOOD GUESS!
:If T<∟H(1
:Then
:T→∟H(1
:Disp "NEW RECORD!
:End
:"HIGH
:If C<0
:"LOW
:If C
:Disp Ans+" WINS!
:Disp "IT TOOK YOU",T
:Pause "TRIES!
:ClrHome
:Output(1,1,"
In addition to making your loops compact, you also want to make sure that you are using the right looping structure. Using Goto/Lbls is not an efficient looping structure because when the calculator sees a Goto it notes the label and proceeds to search for it from top to bottom in your code. This can really be slow if the label is deep within the program. Using Goto/Lbls also has the tendency to make your code harder to follow when you are debugging or when you want to change something. It can make your code a real mess.
The other major reason why you want to avoid using Goto/Lbls is because, if used incorrectly, it can lead to memory leaks. A memory leak is where you don't properly exit a loop. For example, if you have a While loop that you exit out of by using Goto, the calculator still has the respective End for that While loop in its stack. If you do this enough times, the calculator will run out of memory — ERROR:MEMORY.
The recommended loops that you should use instead are Repeat, While, and For. These three looping structures should cover all of the looping that you will need to do. Repeat and While loops are best used when you don't know how many times the loop will be gone through, whereas For loops are best used when you know the specific amount.
You can use Repeat or While loops, but Repeat loops are the recommended loops. The main advantage of using a Repeat loop is that you don't have to set the initial value of the variable in the conditional. The reason is that Repeat loops are gone through at least once whereas While loops will not be gone through at all if the variable in the conditional is the desired value before the first run through. There is no speed difference between Repeat loops and While loops, though.
The way that this applies to our program is that we currently use two Goto/Lbls. We can optimize our program by eliminating the Goto/Lbls and replacing them with a Repeat loop. The loop in our game repeats until the user finally guesses the number. This tells us that A=B should be the conditional next to the Repeat loop. Doing this makes the game smaller and also considerably faster.
:ClrHome
:DelVar TDelVar CrandInt(1,E4→B
:1→dim(∟H
:If not(∟H(1
:20→∟H(1
:Disp "GUESS THE NUMBER
:Disp "RANGE IS 110000
:Repeat A=B
:Input "GUESS: ",A
:T+1→T
:C+(A>B)(A<B→C
:"LOW
:If A<B
:"HIGH
:If A≠B
:Disp Ans+"ER!
:End
:Disp "","GOOD GUESS!
:If T<∟H(1
:Then
:T→∟H(1
:Disp "NEW RECORD!
:End
:"HIGH
:If C<0
:"LOW
:If C
:Disp Ans+" WINS!
:Disp "IT TOOK YOU",T
:Pause "TRIES!
:ClrHome
:Output(1,1,"
Our guessthenumber program is now optimized as much as possible. We have gone through the basic optimizations as well as the advanced optimizations. Sometimes even doing all of these optimizations is not enough, though.
The final optimization
If you are still not satisfied with your program, the final thing that you can do is completely rewrite it. This is usually the last resort because it takes the most amount of work to do. In addition, rewriting your program means that you will have to repeat both of the optimization steps over again.
What you should do during the rewriting process is break down your program into its basic parts, and think about different ways that you can restructure them. One of the most typical problems is a faulty algorithm. The algorithm was not fully thought out or it doesn't work together with the other parts of the program the way it should. You need to go back to the design phase then and rework the algorithm.
Conclusion
Once you have gone through your program and optimized it to the point where you feel confident releasing it to the public, you can then do so. Make sure to create good documentation for it, though.
Documentation is just as important as the program itself. The user wants to know how the program works, the stats of the program, and any other things about the program that might be valuable to know. Why go through all the work of creating a good, optimized program, and then not bother creating good documentation to go with it? Optimizing your program does not guarantee that your program will be successful. Good documentation along with an optimized program does increase the chances, though.
Well, I hope that this guide has helped you with your current program or a program that you have planned for the future. Remember that these are just suggestions on ways to optimize your program; it is your choice whether you follow them. Just know that the person that uses your program will be looking for a professional quality program, so you want to make sure to deliver it!
Scrolls a string across one line, in marquee fashion, on the home screen.
Str1  the text to be scrolled
A,B  the Output( coordinates for the text
N  the number of characters to display at a time
None
Str1, A, B, N, Ans
TI83/84/+/SE
Weregoose
URL: United TI
:Str1
:Repeat getKey
:Output(A,B,sub(Ans,1,N
:sub(Ans,2,length(Ans)1)+sub(Ans,1,1
:If dim(rand(4
:End
By leaving Str1 by itself on one line, we store it to Ans, which will be easier to work with. Then, the Repeat getKey loop will display the marquee until a key — any key — is pressed.
Output(A,B,sub(Ans,1,N will display N characters of Str1 at A,B. Then, the next line will rotate Str1, so that the next time we're at this point in the loop, the string shifts one character.
Finally, If dim(rand(4 is a clever way of delaying the marquee, so it doesn't scroll too fast. rand(4 generates a list of 4 random numbers, which is a slightly timeconsuming process. If dim( is just a way of wrapping this list so it doesn't change Ans. Since dim(rand(4 is always 4, the If statement will always be true, so we don't have to worry about the next line being skipped. By changing 4 to a lower or higher number, you can make the marquee go faster or slower, respectively.
Error Conditions
 ERR:INVALID DIM is thrown if the length N is longer than the number of characters in Str1.
Displays text on several lines on the graph screen.
Str1  text to display
A  starting row
B  starting column
None
Str1, A, B, C, Ans
TI83/84/+/SE
:1→C
:For(A,A,57,6
:inString(Str1,"/",Ans
:Text(A,B,sub(Str1,C,AnsC
:If Ans=length(Str1:57→A
:Ans+1→C
:End
This routine displays a string on the graph screen, with line breaks after every slash "/" character. The routine requires there to be a slash at the end of the string (so, a sample string would be "THIS TEXT IS TOO LONG TO/DISPLAY ON ONE LINE/").
The row and column (A and B) inputs determine the upper and left boundaries of the text. You determine the right boundary by where you put the slash characters. The lower boundary is 57, hardcoded into the routine (this is the lowest that text can be displayed), but you could change this if you wanted a different boundary.
The variable C is used for an index inside Str1, that tells us which character we're currently on. We're starting at the beginning of the string, so we store 1 to C.
The For( loop will increment A by 6 each time we display a line (small font characters are 6 pixels tall). We start at the current value of A, and end at 57 because beyond that, Text( will throw a domain error.
Now, we search for the next slash "/" character using the inString( command. Then, using Text(, we display the line between C and the "/", not including the slash itself. Ans+1→C will move the C index to the next character after the slash.
The line If Ans=length(Str1:57→A will end the loop early as soon as we reach the end of the string. This command can modify Ans, which would be bad, but it only does so when we're ready to exit anyway — at that point, we won't be needing Ans anymore.
Error Conditions
 ERR:INVALID DIM is thrown if Str1 is improperly formatted (check for the backslash at the end).
 ERR:DOMAIN is thrown if text goes off the screen. This shouldn't happen unless B is very close to the right edge, if A or B are negative, or if the calculator is in Horiz mode (in which case, replace 57 with 25).
Related Routines
Highlights text, displaying it in white on a black background.
Str1  text to be displayed
A  row coordinate of the text
B  column coordinate of the text
W  pixel width of the text
None
Str1, A, B, C, W
TI83/84/+/SE
:Text(A,B,Str1
:For(A,A,A+6
:For(C,B1,B+W
:PxlChange(A,C
:End:End
First, we display the string using Text( on the graph screen. This displayed it normally, using black on white. To switch it to white on black, we need to flip the pixels from white to black and black to white — this can be done using PxlChange(. We chose the pixel command over the point command for two reasons: first, it is slightly faster, and second, it uses the same coordinate system as Text( — pixels (if we used PtChange, we'd need to convert from pixels to points to be sure of drawing in the same location).
We loop A from above to below the text, and C from just before the text to immediately after it. Note that because of the way the For( loop works — it saves the lower and upper bound before doing the loop — we can reuse the variable A. But we can't reuse B in the same way in the second For( loop, because the loop is done multiple times — it would work correctly the first time, but then B would have changed for the second.
Since Text( uses variablewidth font, we need the W variable to tell us how long the string is in pixels. For uppercase letters, the width is 4 pixels; for spaces, the width is 1 pixel, and for lowercase letters, the width varies from 2 to 6 pixels.
Because PxlChange( must not go off the screen, check to see that the string fits on the screen entirely (with a border of 1 pixel around it) before displaying it.
Error Conditions
 ERR:DOMAIN is thrown if the string does not fit on the screen entirely.
Related Routines
The cheat sheet is a basic list of the programming commands found in the PRGM menu while programming. Each command includes a brief summary, along with its syntax(s) and specific menu location. Click on the title of each box to see a more detailed description.

































Creates a viruslike effect which locks up the calculator.
None
None
None
TI83/84/+/SE
Disclaimer: We are not responsible for any damage that this routine causes to your calculator or anybody else's calculator. If you decide to try it out on somebody else's calculator, you should give them some warning ahead of time.
:999→dim(∟BUNNY
:While 1
:SortA(∟BUNNY
:End
While it isn't possible to create a true virus in TIBasic, you can create a viruslike effect which locks up the calculator, and forces the user to have to remove the batteries to get out of the program. Removing the batteries causes the calculator to shut off, and when the calculator is turned back on, the RAM will be cleared. This is where the virus aspect comes from.
The idea behind the code is actually pretty simple. The calculator has a few commands (in particular, SortA( and SortD() which cannot be interrupted by the ON key while they are executing. If you give one of these commands a large list (in the case of SortA( and SortD( ), they will be very timeconsuming, which gives the illusion that the calculator has stalled.
Because these commands will eventually finish executing given enough time, an infinite While loop is placed around them so that they will be repeated indefinitely until the person removes their batteries. In addition to these two commands, the Fill( and randBin( commands also work on the older TI83 and TI82 calculators, although it doesn't work on the newer TI83+ and higher calculators.
Sets the TVM solver to use payments at the beginning of a period.
Pmt_Bgn
On the TI83, press:
 2nd FINANCE to access the finance menu.
 ALPHA F to select Pmt_Bgn, or use arrows and ENTER.
On the TI83+ or higher, press:
 APPS to access the applications menu.
 ENTER to select Finance…
 ALPHA F to select Pmt_Bgn, or use arrows and ENTER.
TI83/84/+/SE
2 bytes
The Pmt_Bgn and Pmt_End commands toggle a setting with the finance solver. In Pmt_Bgn mode, the calculator assumes that the payments are made at the beginning of each time period, rather than at the end.
Make sure to set the calculator to one of the modes before using the finance solving commands in a program, since otherwise the result is unpredictable.
Related Commands
Sets the TVM solver to use payments at the end of a period.
Pmt_End
On the TI83, press:
 2nd FINANCE to access the finance menu.
 ALPHA E to select Pmt_End, or use arrows and ENTER.
On the TI83+ or higher, press:
 APPS to access the applications menu.
 ENTER to select Finance…
 ALPHA E to select Pmt_End, or use arrows and ENTER.
TI83/84/+/SE
2 bytes
The Pmt_End and Pmt_Bgn commands toggle a setting with the finance solver. In Pmt_End mode, the calculator assumes that the payments are made at the end of each time period, rather than at the beginning.
Make sure to set the calculator to one of the modes before using the finance solving commands in a program, since otherwise the result is unpredictable.
Related Commands
Computes the net present value of money over a specified time period.
npv(interest rate,CF0,CFList[,CFFreq])
Press:
 2nd FINANCE (on a TI83) or APPS (TI83+ or higher) to access the finance menu
 On the TI83+ or higher, select the first option "Finance…" from the APPS menu
 7 or use arrow keys to scroll to it
TI83/84/+/SE
2 bytes
The npv( command computes the net present value of money over a specified time period. If a positive value is returned after executing npv(, that means it was a positive cashflow; otherwise it was a negative cashflow. The npv( command takes four arguments, and the fourth one is optional:
 interest rate — the percentage of the money that is paid for the use of that money over each individual period of time.
 CF0 — the initial amount of money that you start out with; this number must be a real number, otherwise you will get a ERR:DATA TYPE error.
 CFList — the list of cash flows added or subtracted after the initial money.
 CFFreq — the list of frequencies of each cash flow added after the initial money; if this is left off, each cash flow in the cash flow list will just appear once by default.
Sample Problem
Your mom recently opened a bank account for you, with $500 as a gift to start you off. This is welcome news to you, until you find out that the bank charges 5% as the interest rate for the account. So, you get a job at Rocco's Pizzas delivering pizzas, which brings in $1,000$2,000 each month. For the last five months, in particular, you have earned $1,250, $1,333, $1,575, $1,100, and $1,900. (Assume there are no other expenses, such as gas, car payment, etc.)
Plugging in all of the different values into the npv( command, this is what our code looks like:
:npv(5,500,{1250,1333,1575,1100,1900
Optimization
The npv( command's optional fourth argument should be left off if each cash flow of money in the list of cash flows just appears once.
:npv(5,1550,{2E3,3E3,4E3},{1,1,1
can be
:npv(5,1550,{2E3,3E3,4E3
At the same time, if there are cash flows that occur multiple times, it can be smaller to just use the frequency argument:
:npv(8,0,{200,200,300,300,300
can be
:npv(8,0,{200,300},{2,3
Formulas
Without a frequency list, the formula for npv( is the following:
(1)When a frequency list is used, the same formula can be applied if we expand the list with frequencies into a long list without frequencies. However, it's possible to do the calculation directly. We define the cumulative frequency S_{j} as the sum of the first j frequencies (S_{0} is taken to be 0):
(2)Error Conditions
 ERR:DATA TYPE is thrown if you try to use anything other than a real number for the interest rate.
 ERR:DIM MISMATCH is thrown if the list of cash flows and the list of cash flow frequencies have different dimensions.
Related Commands
A major feature of all TI83 series calculators is their finance calculating capability. In addition to a TVM (Time Value of Money) solver, the calculator has several miscellaneous commands for finance calculations.
Locating the Finance Menu
On the TI83, the finance menu can be accessed by pressing 2nd FINANCE (the 2nd function of the x^{1} key). On the TI83 Plus and higher, Flash applications were added, and as a result, the finance and matrix menus were moved around. On these calculators, you can access the finance menu by pressing APPS and selecting the first option, which will always be "Finance…" Despite its location, the finance menu is not an application (and even if you delete all applications, you can't get rid of it, because it's part of the operating system). However, some tools allow you to hide the finance entry in the application menu.
In the finance menu itself, the first option is the interactive TVM Solver. The commands prefixed with "tvm_", the Pmt_End and Pmt_Bgn settings, and the VARS submenu are also used with this solver. The other commands add further finance functionality.
The TVM Solver
The Time Value of Money Solver is used similarly to the equation solver found in the math menu. You enter the values of the known variables, select the variable you want to solve for, and press ALPHA SOLVE to solve for it. The values you enter and solve for are also stored to the variables found in the VARS submenu. Their meanings are:
 N is the number of payments.
 I% is the interest percent (expressed as a number, not a decimal: 7% is written as 7, not 0.07)
 PV is the present value of a sum of money.
 PMT is the payment amount.
 FV is the future value of the sum of money involved.
 P/Y is the number of payments per year.
 C/Y is the number of coupons per year.
The Pmt setting at the bottom (which you can set in the TVM solver, or with the Pmt_End and Pmt_Bgn commands) determines whether payments are made at the beginning or end of a time period.
In a program, you can use the tvm_Pmt, tvm_I%, tvm_PV, tvm_N, and tvm_FV commands to solve for the PMT, I%, PV, N, and FV variables respectively. You can enter them without arguments to use the values stored to the variables, or give them arguments to use those values instead.
The finance variables also have a use in programming: they are faster to access than normal real variables (presumably, because they have a fixed address in memory). However, they cannot be as the indices in For( loops or seq(, or with IS>( and DS<(. Be aware that P/Y and C/Y are related, which means that when the value of P/Y is changed, the value of C/Y is updated as well.
Other Finance Commands
The other finance commands are:
The last of these, dbd(, has a conceivable use outside the world of finance calculating, since it gives the number of days between two dates.
Zooms to a graphing window that works for the currently graphed equations.
ZoomFit
Press:
 ZOOM to access the zoom menu.
 0 to select ZoomFit, or use arrows and ENTER.
TI83/84/+/SE
2 bytes
The ZoomFit zooms to the smallest window that contains all points of the currently graphed equations. In Func mode, this means that it calculates the minimum and maximum Yvalue for the current Xmin to Xmax range, and sets Ymin and Ymax to those values (Xmin and Xmax remain unchanged). In other graphing modes, this process is done for both X and Y over the range of T, θ, or n.
Optimization
When graphing an equation with ZoomFit, the calculator will first calculate all points to find the minimum and maximum, then calculate all the points again to graph it. This can be time consuming if the equation is very complicated, and in that case doing part of the process manually might be faster if you reuse the points.
Error Conditions
 ERR:INVALID is thrown if this command is using outside a program (although the menu option, of course, is fine).
 ERR:WINDOW RANGE is thrown when the window ends up being empty (if the function is constant, for example)
Related Commands
Zooms to a graphing window which works for all currently selected plots.
ZoomStat
Press:
 ZOOM to access the zoom menu.
 9 to select ZoomStat, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The ZoomStat command command zooms to a graphing window that accurately represents all the currently defined stat plots (see the PlotN( commands). You can think of it as ZoomFit, but for plots rather than equations.
The specific function of the command is as follows: first, the minimum and maximum X and Y coordinates that stat plots will be using are calculated. Xmin, Xmax, Ymin, and Ymax are calculated to fit all these coordinates plus a padding on either side. The padding is 10% of the unpadded range on the left and right (for Xmin and Xmax), and 17% of the unpadded range on the top and bottom (for Ymin and Ymax).
Of course, the exact function varies slightly with the type of plot defined. For example, Ymin and Ymax will not be affected by Boxplot and Modboxplot plots, since they ignore Ycoordinates when graphing. Also, Histogram fitting is a bit trickier than others. Xscl and Yscl also are changed for histograms, though not for the other plots.
For all plots except Histogram, ZoomStat will create a window with Xmin=Xmax (or Ymin=Ymax) if the X range (or Y range) of the data is 0. This will throw an ERR:WINDOW RANGE. If a Histogram causes this error, though, ERR:STAT is thrown, and then when you access the graphscreen ERR:WINDOW RANGE will occur.
Error Conditions
 ERR:INVALID is thrown if this command is using outside a program (although the menu option, of course, is fine).
 ERR:STAT is thrown when trying to ZoomFit to a Histogram with only one distinct number in the data list.
 ERR:WINDOW RANGE is thrown when the window ends up being empty.
Related Commands
Zooms to a square window with allinteger coordinates.
ZInteger
Press:
 ZOOM to access the zoom menu.
 8 to select ZInteger, or use arrows and ENTER.
TI83/84/+/SE
1 byte
When ZInteger is chosen as a menu option outside a program, it asks for a point on the graph screen. This point's coordinates are rounded to the nearest integer point. Then the window variables are changed so the window is centered at this point, and so that the coordinates of every pixel are integers. ΔX and ΔY, the distances between two pixels next to each other, are both 1.
The above process modifies Xmin, Xmax, Ymin, and Ymax. Xscl and Yscl are also modified: both are set to 10. No other variables are modified (unless you count ΔX and ΔY, which are affected as they are defined).
The ZInteger command (usable in a program only) has a slightly different effect: instead of allowing you to choose a point, it automatically uses the point that is the current center.
Advanced Uses
A graph window commonly used in programming can be created by using the ZStandard and ZInteger commands:
:ZStandard
:ZInteger
Error Conditions
 ERR:INVALID occurs if this command is used outside a program.
Related Commands
See Also
Zooms to a square window.
ZSquare
Press:
 ZOOM to access the zoom menu.
 5 to select ZSquare, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The ZSquare command changes the window variables Xmin and Xmax, or Ymin and Ymax, so that ΔX=ΔY, preserving all other settings and the coordinate of the center of the screen. This ensures that a numerical distance on the graphscreen has the same physical length on the calculator display, no matter if it's vertical, horizontal, or diagonal. Probably the most obvious effect of this change is that circles (whether graphed with an equation or drawn with the Circle( command) are actually circles and not ovals.
When determining which of Xmin and Xmax or Ymin and Ymax to change, the command picks the ones that would be increased, and not decreased. This way, the window can never get smaller.
Note that ZDecimal, ZInteger, and to an extent ZTrig already have the same proportions, and don't require a ZSquare command to follow them.
Advanced Uses
ZSquare can be useful in setting up a friendly window.
Error Conditions
 ERR:INVALID occurs if this command is used outside a program.
Related Commands
See Also
Zooms to a trigonometryfriendly window.
ZTrig
Press:
 ZOOM to access the zoom menu.
 7 to select ZTrig, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The ZTrig command sets the screen to a special friendly window useful for trigonometric calculations. Unlike the ZDecimal and ZInteger commands, for which the distance between two pixels is a short decimal or integer, ZTrig sets the horizontal distance between two pixels to be π/24 (in Radian mode) or 7.5 (in Degree mode) . The specific changes ZTrig makes are:
 Xmin=352.5° or 47/24π^{r}
 Xmax=352.5° or 47/24π^{r}
 Xscl=90° or π/2^{r}
 Ymin=4
 Ymax=4
 Yscl=1
Although this window is not quite square (and therefore, distances in the X and Y direction are not exactly equally proportioned), it is quite close, when in Radian mode. In a square window (such as the output of ZSquare), Ymax would have to be 31/24π, which is approximately 4.05789. As you can see, the value of 4 that ZTrig uses is not too far off.
Advanced Uses
In theory, ZTrig should be quite useful in graphing trigonometric functions, since the calculated points would fall exactly on important angles; for example, it would graph the asymptotes of Y=tan(X) correctly. This is actually only true when in Degree mode. In Radian mode, due to roundoff error, the pixels far away from the origin do not exactly correspond to rational multiples of π. For example, the pixel which was supposed to correspond to π/2 actually has a value of .5000000001*π, which is enough to make this command mostly useless.
However, in GT mode, the size that the graph takes up on the screen is different, and ZTrig uses the same values, unlike ZDecimal.
Error Conditions
 ERR:INVALID occurs if this command is used outside a program (but not if the menu option is used, of course).
Related Commands
See Also
Zooms to a friendly window where all pixels have simple coordinates.
ZDecimal
Press:
 ZOOM to access the zoom menu.
 4 to select ZDecimal, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The ZDecimal command makes the following changes to the window variables:
 Xmin=4.7
 Xmax=4.7
 Xscl=1
 Ymin=3.1
 Ymax=3.1
 Yscl=1
If using a TI84+CSE or CE, the window variables become:
 Xmin=6.6
 Xmax=6.6
 Xscl=1
 Ymin=4.1
 Ymax=4.1
 Yscl=1
Because of the dimensions of the graph screen, this has the useful effect that every pixel has round X and Ycoordinates with at most one decimal digit. Also, the screen has correct proportions: a specific distance in the X direction is the same number of pixels in length as the same distance in the Y direction. This makes the window dimensions created by ZDecimal a friendly window (the ZInteger and ZSquare commands also have this effect, but in slightly different ways)
Advanced Uses
Using the ZDecimal command prevents gaps in certain graphs, and makes sure vertical asymptotes with integer coordinates are graphed correctly. Also, circles will be drawn as actual circles with this graphing window(unlike other windows, with which they might appear stretched).
The values given for Xmin, Xmax, etc. above are only correct for the Full mode setting (which is the default, and the most common setting). In Horiz and GT modes, the values will be different, preserving the property that two pixels next to each other differ in coordinates by 0.1:
 Ymin= 1.5 and Ymax= 1.5 in Horiz mode (Xmin and Xmax are the same)
 Ymin= 2.5 and Ymax= 2.5 in GT mode, while Xmin= 2.3 and Xmax= 2.3
Error Conditions
 ERR:INVALID occurs if this command is used outside a program.
Related Commands
See Also
Restores the basic window settings as they were before the last zoom command.
ZPrevious
Press:
 ZOOM to access the zoom menu.
 RIGHT to access the MEMORY submenu.
 ENTER or 1 to select ZPrevious.
TI83/84/+/SE
1 byte
The ZPrevious command (and menu option) restore the window variables Xmin, Xmax, Xscl, Ymin, Ymax, and Yscl to the values they had before the last zoom command. This means, of course, that using ZPrevious a second time will cancel its effects.
Since no variables that are specific to the current graphing mode are changed, ZPrevious doesn't always achieve the effect of reversing the previous zoom command. For example, in Polar graphing mode, ZStandard will set θmin and θmax to 0 and 2π respectively. However, even if they were different before ZStandard, ZPrevious will not restore these settings. Also, ZPrevious doesn't notice if you change the window settings directly (by storing to the window variables).
Unlike ZoomSto and ZoomRcl, the values that ZPrevious uses aren't made available in any sort of variable.
Optimization
Using StoreGDB and RecallGDB is an excellent way to back up graph settings so a program doesn't modify them. However, if all you're doing is changing the window variables with one Zoom command, you can simply use ZPrevious at the end of the program instead.
Error Conditions
 ERR:INVALID occurs if this command is used outside a program (but not if the menu option is used, of course).
Related Commands
Recalls window settings previously saved with ZoomSto.
ZoomRcl
Press:
 ZOOM to access the zoom menu.
 RIGHT to access the MEMORY submenu.
 3 to select ZoomRcl, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The ZoomRcl command restores a backup of the window settings previously saved by ZoomSto — this backup is stored in special variables found in the VARS>Zoom… menu, which are distinguished by a Z in front of their name. For example, Xmin is restored from ZXmin, PlotStart is restored from ZPlotStart, etc.
Only those settings are restored that apply to the current graphing mode (that is, those that you can see in the window screen). And if no backup had been made, then the default settings are restored to (see ZStandard).
One source of confusion with this command can be the fact that ZoomSto and ZoomRcl only deal with the current graphing mode (and don't touch settings from other graphing modes), but some window variables are shared by graphing modes. So some saved zoom variables only applicable to one mode, such as ZTmin, can be from older saves than those applicable to all modes, such as ZXmin.
Error Conditions
 ERR:INVALID occurs if this command is used outside a program (but not if the menu option is used, of course).
Related Commands
Indicates the beginning of a custom list.
∟LISTNAME
While editing a program, press:
 2nd LIST to access the List menu
 RIGHT to access the OPS submenu
 2nd B to select ∟, or use arrows
TI83/84/+/SE
1 byte
The ∟ command indicates the beginning of a custom list (i.e., any list the user creates, not including the default lists L₁…L₆). You almost always need to include this when accessing or manipulating a custom list. The maximum length of the list name (not including the ∟) is five letters. ∟ABCDE works, but ∟ABCDEF does not.
Optimization
You don't need to include the ∟ command when storing (→) to a list. Some of the list commands also allow for this optimization, such as SetUpEditor. However, it can create problems when using Input and Prompt because you might only be asking the user to input a list, but a real variable would also be allowed.
Error Conditions
 ERR:SYNTAX is thrown if you try to reference/create a list with more than 5 characters in its name.
 ERR:UNDEFINED is thrown if you try to use ∟ on an undefined list.
Related Commands
 → (store)
Indicates the end of a block of statements.
If condition
Then
statement(s)
End
While condition
statement(s)
End
Repeat condition
statement(s)
End
For(variable,start,end[,step])
statement(s)
End
While editing a program, press:
 PRGM to enter the PRGM menu
 7 to choose End, or use arrows
TI83/84/+/SE
1 byte
The End command is used together with the different control structures, including the If conditional, While loop, Repeat loop, and For( loop, to indicate the end of the code block for the respective control structure. In the case of the If conditional, you also need to add a Then command, which is used to indicate the beginning of the control structure.
Advanced Uses
You can prematurely end a control structure by using a single If conditional and then having End be its executed command. Because the calculator stores the positions of the End commands, it will take this End command to be the End command of the control structure.
:If <condition>
:End
One of the most important features of the End command is putting multiple control structures inside of each other (known as nesting). While you typically nest If conditionals inside of loops, you can actually nest any control structure inside of any other control structure — this even works when using the same control structure, such as a While loop inside of another While loop.
When nesting control structures, you need to remember to put the appropriate number of End commands to close the appropriate structure. The easiest way to keep track of lots of nested control structures is to code the first part, add an End immediately after the beginning, and then hit 2nd DEL on the line with the End, then hit ENTER a lot of times.
Error Conditions
 ERR:INVALID occurs if this statement is used outside a program.
 ERR:SYNTAX occurs if this statement is used before a logic block has been initiated.
Related Commands
Screenshots are one of the best ways to advertise your program at any stage of production. And as we all know, advertising lies. I mean, whoever said "Honesty is the best policy" obviously either wasn't referring to screenshots or didn't release many popular programs. After all, popularity is measured in how many people download your program, not how many aren't horribly disappointed afterwards!
On a more serious note, while faking screenshots to a submitted program is a BAD idea (on the off chance the archiver won't catch it, the first person to try the program will, and it will get taken down faster than you can say "LinRegTTest"), there are sometimes good reasons to fake a screenshot. For example, if you haven't finished your program yet, but want to hide the fact that you're desperately fixing that final bug. Or perhaps you're in an inconvenient situation in which you can't download screenshotting software, or you can't send the program you want screenshots of to your computer.
Alternatively, you can look at this article as a guide to catching fake screenshots by people that haven't read this guide. Odds are they've made a mistake, then.
The Basics
If the entire image is using the large 5x7 font in a home screenlike setting, your job is easy. Use a calculator or emulator to make a program that outputs the same thing to the screen using a single Output( command. Then, either take a screenshot of that (if you can), or at least use it as a reference.
Start with a 96 by 64 blank image in your favorite image editor (something as simple as Paint will do). If you can make any sort of reference image on a calculator or emulator that shows at least part of what you want, do it and it will make your job easier. Otherwise, you'll have to work from scratch. A useful reference, however, would be a table of all the characters, either in the large 5x7 pixel font, or the small variablewidth font (whichever it is you're using). After drawing the image, you can stretch it to twice the size, but it's probably easier to draw it in a 1:1 ratio.
When you're done making the image, take a critical look at it from the point of view of a suspicious calculator programmer. Where would you look to find a flaw in the screenshot? You might want to start with the…
Common Mistakes
 TIBasic programs cannot access the bottom row and (usually) the rightmost column, so you had better leave those blank. Also, unless you're claiming to turn off the run indicator, you should put one in too.
 A glaring flaw is a character in the calculator font that isn't drawn correctly. Spacing is important here too. All characters in the 5x7 font are 5x7 pixels, with an extra 1pixel gap. In the small font, characters are normally 1 pixel apart, but it's 2 pixels if there's a space.
 Make sure to look up the commands you're purportedly using in the program. If an Output( is the last line of the program, don't you dare add a "Done" to your screenshot. If you're showing the output of a regression, make sure the variables that get displayed are in the right order.
 The Line( command in TIBasic draws a slightly different diagonal line than Paint. A few pixels here or there may be different due to roundoff. This will probably not get you caught, but if possible, draw a real Line( in an emulator or on the calculator, and use it for reference.
Finishing Touches
Finallly, you might try to add the effect of the screenshot having been taken in an actual emulator. For example, PindurTI uses a distinctive pattern for its dark pixels when using a 2:1 ratio — 1 dark pixel and three light pixels (try taking an actual screenshot — of anything — for reference). Of course, PindurTI's run indicator will have gray levels, so don't mess those up either. Or, you can go for the CalcCapture look and add a 1pixel white border and 1pixel black border to the outside.
Easier than Fake
…is real. Seriously, if you can possibly take a real screenshot in an emulator, do it! It will be much less work than a fake screenshot (believe me, I've taken over a hundred screenshots for TIBasic Developer so far).
A Grain of Salt
Take this article with one.
The TIBasic programming language features a wide range of commands for all kinds of things, including output, user input, manipulating variables, linking calculators, and especially math — don't forget a calculator is primarily designed for doing math. In total, there are almost 400 commands on the TI83+ calculators, and the TI84+/SE calculators have an additional 22 commands (because of the new time and date commands and the new math commands added in OS 2.30).
Because sorting through all of these commands is a rather daunting task, especially when trying to figure out which one is appropriate for accomplishing a desired task, we have chosen to present them in three different formats:
 Alphabetical Index — A listing of the commands sorted in alphabetical order.
 Menu Map — A listing of the commands sorted by where they appear in their different menus on the calculator.
 Category — A listing of the related commands grouped together based on their common function and purpose.
There are eleven different command categories that we have come up with:
We tried to do our best to come up with these categories because we believe they reflect the natural divisions of the commands, although some of the commands have functionality that overlaps more than one category. In this case, we decided to simply go with the primary use of the command.
This is a command map as it would appear on the various menus on a TI84+CSE or CE calculator. To see every command, see the Command Index. To see the same map for older calculator versions, see the Black and White Command Map.
Control Flow (PRGM)

Matrices (2nd MATRIX)


Graph Screen (2nd DRAW)

Lists (2nd LIST)


Zoom Menu (ZOOM)

Math Functions (MATH)


Graph Format (2nd FORMAT)

Operators (2nd TEST)


Angle (2nd ANGLE)

Strings (2nd CATALOG)


Statistics (STAT)

Distributions (2nd DISTR)


Stat Plots (2nd PLOT)

Window Variables (VARS 1)


Zoom Variables (VARS 2)
Table Variables (VARS 6)
Function On/Off Variables (VARS YVARS 4)

Statistics Variables (VARS 5)

The TI83 and TI84 series of calculators feature a considerable amount of memory available for storing variables, programs, groups, and even assembly applications (the last two are only available on the TI83+/TI84+/SE calculators). However, as you start putting those things on the calculator, the memory slowly gets used up, and if you don't do anything, the calculator will eventually run out of memory — giving you the dreaded ERR:MEMORY error.
Before getting into memory management, it is important that you know there is a major difference between the TI83 calculator and the rest of the TI83 and TI84 series of calculators. In particular, the TI83 just has RAM (Random Access Memory) memory, while the rest of the calculators have RAM memory as well as Flash ROM (ReadOnly Memory) memory, also known as archive memory.
RAM is the faster memory of the two, and it is what is primarily used whenever you run a program. Its one downfall is that it tends to get cleared very easily after crashes. Most people have probably noticed this when their calculator crashed, and they turned it back on, and it said RAM cleared. In addition, variables in RAM can be overwritten accidentally by a program that uses them.
Flash ROM, on the other hand, is the more reliable memory, and it is what is used when you want to store a program for longterm. Its one downfall is that you can't access something stored in ROM. The only exception to this is assembly programs and applications, which are programmed in the calculator's own programming language and thus can access anything on the calculator.
There are several different commands you can use for managing your calculator's memory:
 DelVar — DelVar is useful for deleting variables, which is the most obvious way to manage memory, and it is what most people are interested in. The DelVar command can delete any variable that you want, with exception to specific elements of a matrix or string or system variables.
 ClrList/ClrAllLists — Similar to DelVar, ClrList and ClrAllLists only work with lists and they set the dimensions of one list or all lists to zero respectively. This essentially causes the list(s) to be deleted, since you can't do anything with a zero element list.
 Clear Entries — When executing programs or doing math on the calculator's home screen, the calculator keeps a history of these entries (you can cycle through them by pressing 2nd ENTER). If you do a lot of stuff on the home screen, the entries history can become rather large.
 Archive/UnArchive — When using variables and programs, you need to move them from archive to RAM; and when you are done using them, you move them back to archive. While you can archive programs on the home screen, that is not possible from inside a program (although you can use an assembly library to do that).
 GarbageCollect — As you archive and unarchive variables and programs, the calculator keeps storing things until it eventually needs to clean the archive memory. Rather than simply leaving this until the calculator finally forces you to do it, which takes a fair amount of time, you can run the GarbageCollect command periodically.
Since the TI83 calculator only has RAM memory, it does not have the Archive, UnArchive, and GarbageCollect commands. If you plan on porting a program to the TI83, you shouldn't use any of these commands, since they will cause the program to be corrupted. In the case of lists, however you can use the SetUpEditor command instead of UnArchive to get around this problem.
Also note that trying to use DelVar or ClrList with an archived variable does not work, and will actually return an ERR:ARCHIVED error.
Accessing the Memory Menu
When accessing a variable or program from the memory menu, you press 2nd MEM. You then select 2:Mem Mgmt/Del and press one to display a scrollable list of all the files on the calculator. You use the up and down keys to move the cursor on the left. On the top lines of the screen you will see how much free RAM and ARC (archive) memory there is.
Once you have found a file you want to delete, press DEL. If the file is not a variable, the calculator will prompt you to confirm the deletion, and you have to select 2:Yes. Once you have found a file you want to archive, press ENTER. An asterisk will appear to the left of the file name, indicating that it is archived. Some files, such as applications, will not allow you to unarchive them since they can only reside in ROM.
Archiving may sometimes not be possible, however, if the calculator does not have sufficient free ROM available. This occurs primarily when a person can't bring themselves to delete a file because they feel like every file is important. At this point, the only option is to delete some files off of their calculator to make room. As part of memory management, a good policy is to keep the calculator's memory organized and to delete any files that you don't need.
Displays the graph screen and allows the user to trace the currentlygraphed equations and plots.
Trace
While editing a program, press the TRACE key.
TI83/84/+/SE
1 byte
The Trace command displays the graph screen, and allows the user to trace any graphed equations or plots. It works in almost exactly the same way as pressing TRACE does outside a program. When the user presses ENTER, control returns to the program.
When tracing, ExprOn and ExprOff affect how the currentlytraced equation is displayed, and CoordOn and CoordOff affect whether the coordinates of the cursor are displayed (RectGC and PolarGC determine the type of coordinates).
Since the ENTER key is already used for exiting, the Trace command lacks some of the functionality of pressing TRACE outside a program, where you can use ENTER to center the graphing window on the cursor. The independent variables X, T, θ, and n cannot by directly typed in, either  they can only be selected with the arrow buttons.
Advanced Uses
As a side effect, the coordinates of the last point traced are stored to X and Y (as well as R and θ, if you're in PolarGC mode, and T, θ and n depending on the graphing mode). Also, the window bounds may change if the user traces an equation past the edge of the screen.
Error Conditions
 ERR:INVALID is thrown if this command is used outside a program.
Related Commands
(by UBERhelp1 06 Dec 2019 18:38, posts: 8)
(by Trenly 06 Dec 2019 08:33, posts: 2)
(by ProfLisa 06 Dec 2019 04:11, posts: 2)
(by Trenly 06 Dec 2019 00:09, posts: 8)
(by emdo843 05 Dec 2019 23:28, posts: 3)
(by emdo843 05 Dec 2019 23:00, posts: 8)
Recent Threads
 CHAR
 → ⸤ ⁻
 × ÷ ±
 √ Σ ≠
 ≥ ≤ π
 Δ χ ▶
 ֿ¹ ² ³
 L₁ L₂ L₃
 L₄ L₅ L₆
 ≅ ℕ º
 θ ∠ ∞
 ♦ ⇧ ∫
 ∏ ©
The mathematical symbol i, short for √(1).
i
To enter a complex number:
realpart+imagpart i
Press 2nd i to paste i.
TI83/84/+/SE/CSE/CE
1 byte
The i symbol is short for √(1), and is used for complex numbers in algebra and complex analysis. On the calculator, entering i will not cause an error, even in Real mode, but operations that result in a complex number (such as taking the square root of a negative number) will. If you're dealing with complex numbers, then, it's best to switch to a+bi or re^θi mode.
Advanced Uses
By using i in a calculation, the calculator switches to complex number mode to do it, even if in Real mode. So √(1) will throw an ERR:NONREAL ANS, but √(0i1) will not (even though it's the same number). This can be used to force calculations to be done using complex numbers regardless of the mode setting — usually by adding or subtracting 0i, although more clever ways can be found.
A good example of this technique is our Quadratic Formula routine.
Related Commands
See Also
Displays the table screen.
DispTable
While editing a program, press:
 PRGM to access the program menu
 RIGHT to select the I/O submenu
 5 to select DispTable, or use arrows and ENTER
TI83/84/+/SE
1 byte
The DispTable comand displays the table screen you normally see by pressing 2nd TABLE, from a running program. The user will see the table screen with a "paused" run indicator, and will be able to use arrows to scroll through it. Pressing ENTER will exit the screen and continue the program.
Advanced Uses
The user can't select any cells in the table to be evaluated if they're not, already. So it's best to select the IndpntAuto and DependAuto options from the 2nd TBLSET menu before using this command. IndpntAsk can also work, however, as long as you store to TblInput first.
Error Conditions
 ERR:INVALID occurs if this statement is used outside a program.
Related Commands
Draws a line tangent to an expression at the specified value.
Tangent(expression,value)
Press:
 2nd PRGM to access the draw menu.
 5 to select Tangent(, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The Tangent( command draws a graph of an expression and then draws a line tangent to that expression, with the line touching the graph at the point of the specified value. You can either use a equation variable (such as Y_{1}) or an expression in terms of X (such as X²). Though you can use equation variables from any graphing mode, they will be treated as functions in terms of X. Tangent( also ignores the graphing mode currently selected.
Here is a simple example, where we are graphing the parabola X^{2} and then drawing a tangent line at the value X=2.
:"X²→Y₁
:Tangent(Y₁,2
or
:Tangent(X²,2
Advanced Uses
Whether the graph shows up or not is dependent on the window dimensions of the graph screen, and you should use a friendly window to ensure it shows up as you intended.
Tangent( will update X and Y for each coordinate drawn (like DrawF and DrawInv), and exit with the last coordinate still stored.
When evaluating the expression using Tangent(, the calculator will ignore the following errors: ERR:DATA TYPE, ERR:DIVIDE BY 0, ERR:DOMAIN, ERR:INCREMENT, ERR:NONREAL ANS, ERR:OVERFLOW, and ERR:SINGULAR MAT. If one of these errors occurs, the data point will be omitted. However, the errors will still be thrown if they occur when evaluating the function at the point of tangency.
Using Ans as an optimization for storing to an equation will not work. For example, the following code returns ERR:DATA TYPE because Ans is a string, not an equation variable.
:"X²
:Tangent(Ans,2
Of course, you can use Ans in the equation, if it's a real number, but that's usually not as useful.
Error Conditions
 ERR:INVALID is thrown if you try to use an equation variable that is undefined.
Related Commands
Draws an expression in terms of X.
DrawF expression
Press:
 2nd PRGM to access the draw menu.
 6 to select DrawF, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The DrawF commands draws a single expression on the graph screen in terms of X using Func graphing mode, regardless of what graphing mode the calculator is actually in. For example, DrawF X² will draw a parabola in the shape of a U on the screen. Of course, how it is displayed all depends on the window dimensions of the graph screen; you should use a friendly window to ensure it shows up as you intend.
Advanced Uses
DrawF will update X and Y for each coordinate drawn (like Tangent( and DrawInv), and exit with the last coordinate still stored.
When evaluating the expression using DrawF, the calculator will ignore the following errors: ERR:DATA TYPE, ERR:DIVIDE BY 0, ERR:DOMAIN, ERR:INCREMENT, ERR:NONREAL ANS, ERR:OVERFLOW, and ERR:SINGULAR MAT. If one of these errors occurs, the data point will be omitted.
For this reason, DrawF can sometimes behave in an unexpected fashion: for example, it doesn't throw an error for list or matrix expressions (it won't graph anything, either).
You can use DrawF to draw an expression instead of having to store an expression to a Y# variable and then displaying it. At the same time, if you plan on manipulating the expression (either changing the value or changing the expression itself), it would be better to simply use the Y# variable.
Related Commands
Calls a library routine from an application opened with OpenLib(
ExecLib
This command can be found in the Prgm Editor CTL menu, press:
 Press "PRGM" while in the Program Editor.
 Go to the last command and press "Enter".
TI84+/SE
2 bytes
Together with OpenLib(, ExecLib is used on the TI84 Plus and TI84 Plus SE for running routines from a Flash App library. This only works, of course, with libraries that have been specifically written for this purpose. The only such library so far is usb8x, for advanced interfacing with the USB port.
Since ExecLib doesn't have any arguments, it would normally be able to run only one library routine. To get around this, usb8x uses a list passed in Ans as arguments to the command. This is most likely how any future libraries will do it as well.
The following program, which displays the version of usb8x, is an example of how to use OpenLib( and ExecLib:
:OpenLib(USBDRV8X
:{6
:ExecLib
:Ans(2)+.01Ans(3
Download usb8x here. You may also be interested in MSD8x which is a GUI for usb8x.
Related Commands
Sets up a compatible Flash application library for use with ExecLib
OpenLib(library)
This command is only found in the catalog menu. Press:
 2nd CATALOG to access the command catalog.
 O to skip to commands starting with O.
 ENTER to select OpenLib(.
TI84+/SE
2 bytes
Together with ExecLib, OpenLib( is used on the TI84 Plus and TI84 Plus SE for running routines from a Flash App library. This only works, of course, with libraries that have been specifically written for this purpose. The only such library so far is usb8x, for advanced interfacing with the USB port.
The following program, which displays the version of usb8x, is an example of how to use OpenLib( and ExecLib:
:OpenLib(USBDRV8X
:{6
:ExecLib
:Ans(2)+.01Ans(3
Related Commands
The TI84 Plus and TI84 Plus SE, which have a builtin hardware clock, introduce several commands for dealing with time. Some of these rely on the builtin clock, while others are used for formatting times and dates and could technically have been introduced on earlier calculators. However, the only time/date command that is available on the pre84 calculators is dbd(.
All of these commands except dbd( can be found only through the command catalog (2nd CATALOG). dbd( can also be found in the Finance menu — 2nd FINANCE on the TI83, and APPS 1:Finance… on the TI83+ or higher.
Despite its name, the Time command has nothing to do with the clock. It is a mode setting for sequence graphs.
LowLevel Commands
 startTmr — This command returns the current value of a timer that is updated every second when the clock is enabled. This value doesn't correspond to any actual time, but can be used with checkTmr( to get a time difference.
 checkTmr( — checkTmr(X) is equivalent to startTmrX. This can be used to get the time elapsed since startTmr was used.
 ClockOn, ClockOff — Enables or disables the hardware clock.
 isClockOn — Tests if the clock is enabled or not.
Time Commands
 setTime( — Sets the current time, in hours, minutes, and seconds. If the clock is enabled, this time will be updated every second.
 getTime — Returns the current time as the list {hours, minutes, seconds}. This command is unaffected by time format.
 setTmFmt( — Sets the time format  12 hour, or 24 hour.
 getTmFmt — Returns this time format setting.
 getTmStr( — Returns the current time as a string, affected by time format (though you can override it with an optional argument).
Date Commands
 setDate( — Sets the current date (year, month, and day). If the clock is enabled, this date will be updated as needed.
 getDate — Returns the current date as the list {year, month, day}. This command is unaffected by date format.
 setDtFmt( — Sets the date format  1 for month/day/year, 2 for day/month/year, or 3 for year/month/day.
 getDtFmt( — Returns this date format setting.
 getDtStr( — Returns the current date as a string, affected by date format (though you can override it with an optional argument).
Time/Date Manipulation
 timeCnv( — Converts a number of seconds into a list of {days, hours, minutes, seconds} representing the same time lapse.
 dayOfWk( — Returns the day of week (Sunday through Saturday encoded as 1 through 7) of a specified date.
 dbd( — Returns the number of days between two dates — this command is available on all calculators, not just the 84+/SE.
Converts seconds into the equivalent days, hours, minutes, and seconds.
timeCnv(value)→variable
This command can only be found in the catalog. Press:
 2nd CATALOG to enter the command catalog
 t to skip to commands starting with T
 Scroll down to timeCnv( and select it
TI84+/SE
2 bytes
The timeCnv( command converts seconds into the equivalent days, hours, minutes, and seconds. You just specify a number of seconds (should be a whole number, although a decimal number would work too; the calculator will simply use the integer part and discard the decimal) and the calculator will automatically break the seconds up into the standard parts of time, storing them in list format — {days,hours,minutes,seconds}. You can store this list to a variable for later use, or manipulate it the same way you do with other lists.
The number of seconds you specify can be as small or large as you want, although the number must be at least zero (in which case, the time list will be all zeroes). At the same time, you will run into the standard number precision problems that plague TIBasic when specifying an extremely large or small number. Because of this, you should try to use numbers with less than 10 digits. Here is a simple example, where the time is exactly 1 day, 1 hour, 1 minute, and 1 second:
:timeCnv(90061→L1
:Disp Ans
The time conversion is 60 seconds for a minute, 3600 (60*60) seconds for an hour, and 86400 (60*60*60) seconds for a day. Adding these three together plus the one second gives you the value that you see in the example. This is pretty basic math, so it should be easy to understand.
Related Commands
Sets the time format of the clock on the TI84+/SE.
setTmFmt(value)
This command can only be found in the catalog. Press:
 2nd CATALOG to enter the command catalog
 s to skip to commands starting with S
 Scroll down to setTmFmt( and select it
TI84+/SE
2 bytes
The setTmFmt( command sets the time format of the clock on the TI84+/SE calculators when displaying the time on the mode screen. There are two different formats available, and you simply use the respective value (can be either a literal number or a variable) to display the desired one: 12 (12 hour) or 24 (24 hour). For example, this would set the time format to 24 hour:
:setTmFmt(24
In order for the time format to work, you need to set the time using either the setTime( command, or by going into the set clock menu (accessible by pressing ENTER on the 'SET CLOCK' message that is displayed at the bottom of the mode screen). Of course, the time will only show up if the clock is on; if you need to turn the clock on, use the ClockOn command, or scroll down to the 'TURN CLOCK ON' message that is displayed in place of the clock on the mode screen and press ENTER twice.
Related Commands
Sets the time of the clock on the TI84+/SE.
setTime(hour,minute,second)
This command can only be found in the catalog. Press:
 2nd CATALOG to enter the command catalog
 s to skip to commands starting with S
 Scroll down to setTime( and select it
TI84+/SE
2 bytes
The setTime( command sets the time of the clock on the TI84+/SE calculators. It takes three arguments: the hour, the minute, and the second. The hour must be in 24 hour format — where 13 is equal to 1 P.M. — and the minute and second need to be a valid number within the appropriate range (160). For example, this would set the time to 12:30:30:
:setTime(12,30,30
Once you have set the time, you can display it in two different formats on the mode screen using the setTmFmt( command: 12 (12 hour) or 24 (24 hour). Of course, the time will only show up if the clock is on; if you need to turn the clock on, use the ClockOn command, or scroll down to the 'TURN CLOCK ON' message that is displayed in place of the clock on the mode screen and press ENTER twice.
Related Commands
Returns the current time of the clock on the TI84+/SE as a string.
getTmStr(value)→variable
This command can only be found in the catalog. Press:
 2nd CATALOG to enter the command catalog
 g to skip to commands starting with G
 Scroll down to getTmStr( and select it
TI84+/SE
2 bytes
The getTmStr( command returns the current time of the clock on the TI84+/SE calculators as a string based on the time format that is specified. There are two different time formats available: 12 (12 hour) or 24 (24 hour). You can store this value to a string variable for later use, or manipulate it the same way you do with other strings. Of course, this command only works if the time format has actually been set, so you should use the setTmFmt( command before using it.
Related Commands
Returns the time format of the clock on the TI84+/SE.
getTmFmt→Variable
This command can only be found in the catalog. Press:
 2nd CATALOG to enter the command catalog
 g to skip to commands starting with G
 Scroll down to getTmFmt( and select it
TI84+/SE
2 bytes
The getTmFmt( command returns the current time format of the clock on the TI84+/SE calculators as an integer. There are two different time formats available: 12 (12 hour) and 24 (24 hours). You can store this value to a variable for later use. Of course, this command only works if the time format has actually been set, so you shold use the setTmFmt( command before using it.
Related Commands
Returns a list with the current time that the clock has on the TI84+/SE.
getTime→Variable
This command can only be found in the catalog. Press:
 2nd CATALOG to enter the command catalog
 g to skip to commands starting with G
 Scroll down to getTime and select it
TI84+/SE
2 bytes
The getTime command returns the current time that the clock has on the TI84+/SE calculators in list format — {hour, minute, second}. You can store this list to a variable for later use, or manipulate it the same way you do with other lists. Of course, this command only works if the time has actually been set, so you should use the setTime( command before using it.
An interesting note about this command is that you cannot use the standard listname(var) to access elements  If you try, it multpilies each element of the clock by the number.
Related Commands
Returns whether the clock on the TI84+/SE is on or off.
isClockOn
This command can only be found in the catalog. Press:
 2nd CATALOG to enter the command catalog
 i to skip to commands starting with I
 Scroll down to isClockOn and select it
TI84+/SE
2 bytes
The isClockOn command returns whether the clock on the TI84+/SE calculators is on or off. Based on Boolean logic, it will return 1 if it is on and 0 if it is not. You can store it to a variable for later use, or use it in conditionals and loops as part of the condition. For example, here is how you would check to see if the clock is on:
:If isClockOn
:Then
(code if clock is on)
:Else
(code if clock is off)
:End
Related Commands
Returns the current date of the clock on the TI84+/SE as a string.
getDtStr(value)→variable
This command can only be found in the catalog. Press:
 2nd CATALOG to enter the command catalog
 g to skip to commands starting with G
 Scroll down to getDtStr( and select it
TI84+/SE
2 bytes
The getDtStr( command returns the current date of the clock on the TI84+/SE calculators as a string based on the date format that is specified. There are three different date formats available: 1 (M/D/Y), 2 (D/M/Y), or 3 (Y/M/D). You can store this value to a string variable for later use, or manipulate it the same way you do with other strings. Of course, this command only works if the date format has actually been set, so you should use the setDtFmt( command before using it.
Related Commands
Returns the date format of the clock on the TI84+/SE.
getDtFmt→Variable
This command can only be found in the catalog. Press:
 2nd CATALOG to enter the command catalog
 g to skip to commands starting with G
 Scroll down to getDtFmt( and select it
TI84+/SE
2 bytes
The getDtFmt( command returns the current date format of the clock on the TI84+/SE calculators as an integer. There are three different date formats available: 1 (M/D/Y), 2 (D/M/Y), and 3 (Y/M/D). You can store this value to a variable for later use. Of course, this command only works if the date format has actually been set, so you should use the setDtFmt( command before using it.
Related Commands
Returns a list with the current date that the clock has on the TI84+/SE.
getDate→Variable
This command can only be found in the catalog. Press:
 2nd CATALOG to enter the command catalog
 G to skip to commands starting with G
 Scroll down to getDate and select it
TI84+/SE
2 bytes
The getDate command returns the current date that the clock has on the TI84+/SE calculators in list format — {year, month, day}. You can store this list to a variable for later use, or manipulate it the same way you do with other lists. Of course, this command only works if the date has actually been set, so you should use the setDate( command before using it.
An interesting note about this command is that you cannot use the standard listname(var) to access elements  If you try, it multiplies each element of the clock by the number. You may, however, call the command and thus store it in Ans, then retrieve individual elements.
Related Commands
Sets the date format of the clock on the TI84+/SE.
setDtFmt(value)
This command can only be found in the catalog. Press:
 2nd CATALOG to enter the command catalog
 s to skip to commands starting with S
 Scroll down to setDtFmt( and select it
TI84+/SE
2 bytes
The setDtFmt( command sets the date format of the clock on the TI84+/SE calculators when displaying the date on the mode screen. There are three different formats available, and you simply use the respective value (can be either a literal number or a variable) to display the desired one: 1 (M/D/Y), 2 (D/M/Y), or 3 (Y/M/D). For example, this would set the date format to Month/Day/Year:
:setDtFmt(1
In order for the date format to work, you need to set the date using either the setDate( command, or by going into the set clock menu (accessible by pressing ENTER on the 'SET CLOCK' message that is displayed at the bottom of the mode screen). Of course, the date will only show up if the clock is on; if you need to turn the clock on, use the ClockOn command, or scroll down to the 'TURN CLOCK ON' message that is displayed in place of the clock on the mode screen and press ENTER twice.
Related Commands
Sets the date of the clock on the TI84+/SE.
setDate(year,month,day)
This command can only be found in the catalog. Press:
 2nd CATALOG to enter the command catalog
 s to skip to commands starting with S
 Scroll down to setDate( and select it
TI84+/SE
2 bytes
The setDate( command sets the date of the clock on the TI84+/SE calculators. It takes three arguments: the year, the month, and the day. All three of these must be integers; in particular, year must be four digits, and month and day can be one or two digits. They represent the associated value that goes with a respective date. For example, this would set the date to January 1, 2008:
:setDate(2008,1,1
Once you have set the date, you can display it in three different formats on the mode screen using the setDtFmt( command: Month/Day/Year, Day/Month/Year, or Year/Month/Day. Of course, the date will only show up if the clock is on; if you need to turn the clock on, use the ClockOn command or select 'TURN CLOCK ON' , displayed in place of the clock on the mode screen.
Related Commands
Turns on the clock display in the mode screen.
ClockOn
This command can only be found in the catalog. Press:
 2nd CATALOG to enter the command catalog
 C to skip to command starting with C
 Scroll down to ClockOn and select it
TI84+/SE
2 bytes
The ClockOn command turns on the clock display at the bottom of the mode screen on the TI84+/SE calculators. Alternatively, you can scroll down to the 'TURN CLOCK ON' message that is displayed in place of the clock on the mode screen and press ENTER twice. You can turn the clock off by using the ClockOff command.
Related Commands
Turns off the clock display in the mode screen.
ClockOff
This command can only be found in the catalog. Press:
 2nd CATALOG to enter the command catalog
 C to skip to command starting with C
 Scroll down to ClockOff and select it
TI84+/SE
2 bytes
The ClockOff command turns off the clock display at the bottom of the mode screen on the TI84+/SE calculators. You can turn the clock back on by using the ClockOn command, or by selecting 'TURN CLOCK ON' ,displayed in place of the clock on the mode screen.
The ClockOff command does not actually turn the clock off. The time can still be accessed through use of the getTime and getDate commands, and all their cousins.
Related Commands
Returns the number of seconds since the timer was started.
checkTmr(Variable)
This command can only be found in the catalog. Press:
 2nd CATALOG to enter the command catalog
 C to skip to command starting with C
 Scroll down to checkTmr( and select it
TI84+/SE/CSE
2 bytes
The checkTmr( command is used together with the startTmr command to determine how much time has elapsed since the timer was started on the TI84+/SE calculators. In particular, it returns the number of seconds since the builtin timer was started. An application of these commands is timing different commands or pieces of code, as well as countdowns in games, or a timebased score (such as in Minesweeper).
To use the timer, you first store startTmr to a variable (usually, a real variable) whenever you want the count to start. Now, whenever you want to check the elapsed time, you can use checkTmr( with the variable from above, giving you the number of seconds that have passed. Using checkTmr( doesn't stop the timer, you can do it as many times as you want to.
In the case of Minesweeper, for example, you would store startTmr to, for example, T, after setting up and displaying the board, display the result of checkTmr(T) in the game's keyreading loop, and store checkTmr(T) to the player's score if he wins.
Advanced Uses
To time a command or routine using startTmr and checkTmr(, use the following template:
:ClockOn
:startTmr→T
:Repeat checkTmr(Ans
:End
:For(n,1,(number) //sequence variable n
(command(s) to be tested)
:End
:checkTmr(T+1)/(number)
Making (number) higher increases accuracy, but takes longer. Also, make sure not to modify the variables n or T inside the For( loop.
While this method eliminates human error from counting, it's prone to its own faults. For example, startTmr and checkTmr( always return the time rounded down to a whole second. To take this into account, replace the last line:
:(checkTmr(T+{1,0})/(number)
When testing code, be aware that many different things affect the time: the strength of the batteries, the amount of free RAM, and including the closing parenthesis on the For( loop. The last one, in particular, has an impact when using a singleline If statement or one of the IS>( and DS<( commands on the first line inside a For( loop.
Related Commands
Returns the value of the clock timer on the TI84+/SE.
startTmr→Variable
This command can only be found in the catalog. Press:
 2nd CATALOG to enter the command catalog
 T to skip to command starting with T
 Scroll up to startTmr and select it
TI84+/SE
2 bytes
The startTmr command is used with the builtin timer that is available on the TI84+/SE calculators. It is used together with the checkTmr( command to determine how much time has elapsed since the timer was started. An application of these commands is timing different commands or pieces of code, as well as countdowns in games, or a timebased score (such as in Minesweeper).
To use the timer, you first store startTmr to a variable (usually, a real variable) whenever you want the count to start. Now, whenever you want to check the elapsed time, you can use checkTmr( with the variable from above, giving you the number of seconds that have passed. Using checkTmr( doesn't stop the timer, you can do it as many times as you want to.
In the case of Minesweeper, for example, you would store startTmr to, for example, T, after setting up and displaying the board, display the result of checkTmr(T) in the game's keyreading loop, and store checkTmr(T) to the player's score if he wins.
Despite the name of the command, startTmr doesn't start the clock if it's stopped; use ClockOn instead to start the clock.
Advanced Uses
To time a command or routine using startTmr and checkTmr(, use the following template:
:ClockOn
:startTmr→T
:Repeat checkTmr(Ans
:End
:For(n,1,(number) //sequence variable n
(command(s) to be tested)
:End
:checkTmr(T+1)/(number)
Making (number) higher increases accuracy, but takes longer. Also, make sure not to modify the variables n or T inside the For( loop.
While this method eliminates human error from counting, it's prone to its own faults. For example, startTmr and checkTmr( always return the time rounded down to a whole second. To take this into account, replace the last line:
:(checkTmr(T+{1,0})/(number)
When testing code, be aware that many different things affect the time: the strength of the batteries, the amount of free RAM, and including the closing parenthesis on the For( loop. The last one, in particular, has an impact when using a singleline If statement or one of the IS>( and DS<( commands on the first line inside a For( loop.
Related Commands
Screenshots are one of the best ways to advertise your program at any stage of production. They're also great for explaining a problem you have, explaining how to fix a problem, demonstrating a calculator feature, or being displayed at the top of a TIBasic Developer page. This tutorial will explain you some easy ways to create still and animated screenshots.
To begin with, you'll need an emulator (a list is available on our resources page). If you're taking a screenshot of a program on your calculator, you'll need to send it to the computer (see linking) first, then transfer it to the emulator. Although there are many methods of taking screenshots, I'll only cover a few of them.
Still Screenshots
These are easy to make with any emulator, even one that doesn't have any screenshot functionality. You can simply use the Print Screen key on your computer to take a screenshot of the entire screen. Then, use any image editor, even one as simple as MS Paint, to remove everything except the emulator's image of the calculator screen. You can also add a border or anything else easily at this point. Save the image and you're done!
Alternatively, you can use TIScreen Capture, included with TIConnect. The icon looks like a camera and the software will take a picture of your calculator's screen.
Animated Screenshots with CalcCapture
CalcCapture allows you to take an animated screenshot of almost any emulator, with any skin. To begin using it, download CalcCapture, and run it (it doesn't require installation) at the same time as the emulator.
The first time you're using CalcCapture with a particular emulator, press the Configuration button at the top right of the CalcCapture window. Then press New at the top to configure a new emulator. Select the calculator you're emulating, and press the button to the right of the Windows Title field to select the window with the calculator in it. Press Capture to take a screenshot of the window at this moment, and arrange the numbers for the emulator window so that they match the calculator screen. (if it helps, the width and height should be multiples of 96 and 64 respectively — 95 and 63 if you don't want the bottom row and column that you can't access in Basic). Press OK when you're done.
For taking screenshots, the default settings should be sufficient. Choose ANIMATION for the "Capture Type" option, and enter the file name you want. Then press Capture and Stop Capture when you want to take the screenshot (or, you can use a hotkey). The counter at the top right of the screen shows the number of frames that have been captured.
Animated Screenshots with PindurTI
The emulator PindurTI won't work with CalcCapture because the window title changes constantly, but it has its own screenshotting ability: while using the emulator, you can press Tab to start and then to stop the screenshot, which will be saved as ptiani#.gif in the same place that you put pindurti.exe. This is the socalled "crude screenshot", at 9 frames per second; you can take a "fine screenshot" at 25 frames per second with the Backspace key, but such a screenshot will not be displayed correctly in most browsers — it will be animated almost 3 times slower, giving the impression that your program is slower than it really is. Besides, 9 frames per second is good enough for most programs in any case.
Some Considerations
When taking animated screenshots, try to plan out what you're going to show before taking the screenshot (if possible, down to the keys you're going to press). Don't include any of the unnecessary detail, like selecting the program out of the menu and pressing ENTER (start in the program itself).
If an actual screenshot is out of the question for one reason or another, consult the Fake Screenshots tutorial.
This article is part of the releasing stage of the development cycle. 
Many programming guides give you excellent advice on programming, but stop at the point when the program is finished, tested, and optimized. After all, most people can manage to release a program somewhere, one way or another. But in reality, an inexperienced programmer may well release his work quietly and in an unassuming form, which people will simply glance over without stopping. This tutorial will tell you how to avoid this, and make your program get all the attention it deserves.
Where to Release
First, it's important to know where to go to upload your program to the Internet. Although you might want to create your own website and release all your games there, that alone will not get your program noticed. Sure, having your own site might get you some publicity, but the best way to get your game noticed is by releasing it at one (or all!) of the large program archives.
Of these, ticalc.org is by far the largest (and most popular), but it's also likely you'll spend longer waiting for your program to be put up there. With CalcGames, and UnitedTI, you only have to wait a day or two. With TIBasic Devloper, you only have to wait a few minutes, or you could do it yourself.
What to Release
There's more you'll want to submit than just the program itself. Here are the elements you'll want to put together — some of these are called optional by the file archive websites, but they are mandatory if you want the program to be successful.
The program itself (obviously)
If you were programming on the calculator, you'll need to transfer the program to your computer to submit it. You'll need a calculatortocomputer cable, and software such as TIConnect. If you don't know where to get these, or have problems using them, see linking.
Now, you have one or more files from your calculator on the computer. If there's only one, you're good to go. If there are several files involved, you should consider combining them in a group file (usually .83g or .8xg). Or keep them like they are, but then make sure to mention what each file is for, in the readme.
Although, if you don't want to worry about having to ungroup, or group the files, another option for monochrome calculators is Basic Builder. Basic Builder packages your programs, in an app. More information, is given at this page.
The readme
A critical step in submitting a program. Make sure to read our tutorial on writing a readme if you've never done it before (and possibly even if you have). Usually, longer is better than shorter (it's worse if someone doesn't understand how your program works, than if they have what they already know explained to them again) — unless it's a fiveact play, in which you might consider removing the nonessentials. Generally, the longer and better your program, the longer your readme can be; you don't need any more than the minimum for, say, a quadratic solver. For a huge program, a 24 page plain text file is appropriate.
Also, please don't make the readmes in Microsoft Word 7 file format! A .txt file is sufficient, and in fact recommended. However, if you're just itching to put screenshots, pictures, and format your whole paragraph accordingly, a .pdf file would be a good idea. PDF files can be read by most computers automatically, but if not, Adobe reader, is free. It might be a good idea, to put a file with a link to an adobe download station. Most likely http://get.adobe.com/reader/ will be the link to get adobe reader. You might also want to mention that it's free. Make sure you have that .txt file that gives the information on where to find adobe.
The screenshot
All four websites listed above let you add a still or animated screenshot of your program. This is very easy to do — see the making a screenshot page — and goes a long way toward making your program look good (if it actually is good). An attractive screenshot will encourage visitors to download your program more than the most flowery prose. Show your program at its most impressive here.
Getting a screenshot is easy, open TI Connect, in 1.7 and 1.6, it should look like a camera. Click it.
The title
The title will tell visitors what your program is all about. One common mistake is making the title the same as the 8character name of the program. Don't do this — the title is the first thing people will see, and you want to make it clear. Of course, if the program is called prgmTETRIS it's okay to call it Tetris (though Grayscale Tetris, if that's the case, could be even better). But if the program is called prgmQUADSOLV, please make the title Quadratic Solver instead!
The description
Don't forget this! It should have three parts:
 What the program is about. "Solves all quadratic equations over the complex numbers."
 The program's best qualities. "A grayscale interface at the low size of 13 bytes!"
 Any requirements. "Requires xLIB, Omnicalc, Symbolic, and DAWG to work correctly. Also, create and unarchive GDB7."
The first two parts are positive; the third is negative, but necessary (imagine if your program crashes without warning if GDB7 is not created. 99% of your users will be lost, even if this is explained in the readme, and write negative reviews). You want to make this section as short as possible, and the best way to do this is to avoid the requirements in the first place. Even if you're game is in the "games for xLib" category, the one who is looking for a game might not see this, and not download, or install xlib.
Putting this together
The program and the readme should be combined in a .zip archive, this is a communitywide standard. The file upload form (this is different for all websites, but contains the same basic information to be entered) should have fields where you can submit everything else. You might also consider adding the screenshot to the .zip archive, in addition to its normal location.
Here are the links to the file upload forms of all the websites mentioned on this page.
Note: You need to create an account at the respective website before you can upload files there.
Marketing
Marketing your program can start as early as when you first get the idea for your program, although many people won't take you seriously until you have at least a basic engine to show for your efforts. Other good points at which to advertise the program include a betatesting period before you release it to the masses, and of course when it's finally released. For more marketing tips, see our marketing tutorial.
<< Marketing  Overview  Creating New Program Versions >> 
One of the most important features of the TI graphing calculators is their linking, where they communicate with another TI calculator or a computer across a link cable that is connected between them. There are a few different link cables that TI has created, and they each have their own advantages and disadvantages:
 Graph Link — This is the classic link cable that has been around since the TI83 was first released. It works with every calculator before the TI84+CE, and it comes in black (for the PCs) or gray (for the Macs). It works with the Graph Link software, which doesn't work very well with the newer calculators. The TI84+CE no longer has an I/O port so this cable cannot be used to transfer data.
 USB Link — This is the new link cable that is designed to be much faster, since it uses the USB port of a computer rather than the COMM port that Graph Link uses. Besides the port, it also only works with the TI Connect software instead of the Graph Link software.
 Mini USB Link — This is only available on the newer TI84+/SE calculators, since it actually uses the second smaller USB port on the TI84+/SE calculator instead of the usual I/O port. It works pretty much the same way the USB Link does, and in fact uses the same TI Connect software.
In addition to the official link cables, you can also make your own using parts of other cables. Putting together a link cable is a rather delicate operation, and requires a considerable amount of knowledge of electronics and linking. This isn't recommended unless you know what you are doing — if you screw up, you can really mess up your calculator!
Calculator to Calculator
There are two commands that you can use when linking one calculator to another: GetCalc(, and Get(. The GetCalc( command was designed such that you can receive a variable from another calculator; unfortunately there are very specific requirements for the sending calculator to actually send the variable (it must be in a preemptible state like Pause or Menu(, and cannot be executing an assembly program). Whilst this can seem a difficult task to actually create a fully functional and fun multiplayer game, the multiplayer page shows workarounds to make such a program achievable — the key to which is fully understanding the nature of GetCalc(.
The Get( and Send( commands were created for use with the CBL (CalculatorBased Laboratory) and CBR (CalculatorBased Ranger) devices in math and science classes. These devices collect realtime data from various sensors that you can connect to them, and allow you to view and analyse the results. At the same time, they were originally used by the TI82 calculator for receiving and sending variables respectively between calculators, and actually still operate in that capacity.
The ^ operator is used to raise a number to a power. It can be used with numbers, expressions, and lists. It can be used for taking nonnegative integer powers of square matrices (up to the 255th power only, however), but not for negative powers (use ֿ¹ instead) or matrix exponentials (which the TI83+ cannot do).
In general, x^y returns the same results as e^(y*ln(x)). For expressions of the form x^(p/q), where p and q are integers and q is an odd number, the principal branch is returned if x is complex, but the real branch is returned if x is a negative real number.
(1)^(1/3)
1
(1+0i)^(1/3)
.5+.8660254038i
Optimization
When raising 10 or e to a power, use the 10^( and e^( commands instead. Similarly, use the ², ³, or ֿ¹ commands for raising a number to the 2, 3, or 1 power.
Error Conditions
 ERR:DOMAIN is thrown when calculating 0^0, or raising 0 to a negative power.
 ERR:NONREAL ANS is thrown in Real mode if the result is complex (and the operands are real)
Related Commands
Returns an integer from 1 to 7, each representing a day of the week, given a date.
dayOfWk(year,month,day)
Press:
 [2ND] + [0] for the CATALOG
 [X^{1}] to jump to the letter D
 [ENTER] to insert the command
TI84+/SE
2 bytes
dayOfWk(year,month,day) returns an integer from 1 to 7, each representing a separate day of the week. 1 represents Sunday, 2 represents Monday, and so on, with 7 representing Saturday. The date format is different than the normal American format (month/day/year), so be careful to put the arguments in the right order. You can remember this by thinking of the descending lengths of time in each of the arguments.
:dayOfWk(2007,12,30)
The above code returns 1, because the 30^{th} of December, 2007, is a Sunday.
Error Conditions
 ERR:DOMAIN is thrown if any of the arguments are nonintegers, or the date does not exist, such as the 42^{nd} of February. However, the year does not matter (a date that takes place in the year 10000 is valid). However, there are exceptions, even if some dates do exist, this error may still occur. If you attempt to calculate the previous day of a week such as the previous day, the error may still occur.
Related Commands
See Also
 Day of Week — routine to calculate the day of the week
Character Types  

Letters  AZ, az, θ 
Numbers  09 
Symbols  !, ', ", etc. 
Variables  L_{1}, ΔTbl, etc. 
Functions  sin(, max(, etc. 
Commands  Disp, If, etc. 
There are several different kinds of characters that you can use in TIBasic, including letters, numbers, symbols, variables, functions, and even other commands. You can store the characters together in groups as strings, and you can then perform operations on the strings or the calculator can display them on the screen.
:"ABC123
:Disp Ans
:Disp expr(sub(Ans,4,3
Although lowercase letters are not available by default, a good substitute is the statistics variables by pressing VARS and then scrolling down to Statistics. You will not find variables for all of the lowercase letters, but you will find: a, b, c, d, e, i, n, p, r, s, t, u, v, w, and z. Another way to access lowercase letters is by using an assembly program to turn on the lowercase flag that the calculator uses for enabling lowercase letters.
While lowercase letters look nice, they are the epitome of memory wasters: at a single character, they each take up 2 bytes of memory. A program that uses a lot of lowercase letters can fill up all of RAM very quickly! This may be avoided by using uppercase letters instead, which only take up 1 byte each.
Advanced Uses
Back when the TI82 and TI83 calculators were popular, most people didn't know about the statistics variables and there weren't many assembly programs available for setting the lowercase flag, so you would see people making text by putting together multiple functions or commands and using different pieces of them.
For example, to make the word "Hell" you can use Horiz to get the 'H', e to get the 'e', and two copies of ln( to get the 'll'. You would then just erase the leftover characters (in this case, 'n(') with spaces.
:Output(2,1,"Horiz
:Output(2,2,"e
:Output(2,3,"ln(
:Output(2,4,"ln(
:Output(2,5," (2 spaces)
Similar to the lowercase letters, the calculator actually has several additional ASCII characters builtin that are only available through an assembly program. It's a shame that these characters aren't available, since some of them (such as @, &, #, $, %, and the internal characters like ä) would be very useful in games and text programs.
You can also save memory by replacing words such as "If", " or ", " and " with the appropriate commands, when displaying text. Such a command will only take up 1 byte, whereas the text may be much larger memorywise.
The two characters that you can't put in a string using a TIBasic program are quotation marks (") and the store command (→). However, you can mimic these respectively on the graph screen with the Text( command by using two apostrophes (''), and a subtract sign with a greater than sign (—>). Alternatively, you can use the following method to put either one or both of these symbols into Str1, outside a program:
 Type them on the home screen and press [ENTER]
 Select 2:Quit when the ERR:SYNTAX comes up.
 Press [Y=] to go to the equation editor.
 Press [2nd] [ENTRY] to recall the symbols to Y_{1}
 Now, use Equ►String(Y_{1},Str1) to store the symbols to a string.
Problems using Characters
Because the calculator treats each character as a token, including functions and commands, this can create problems. For example, if you ask the user to input a name, they could enter "InputPromptDisp123" (using the respective commands), and the calculator would count it as just six characters — 'Input' (1), 'Prompt' (2), 'Disp' (3), '1' (4), '2' (5), and '3' (6).
:ClrHome
:Input "Name? ",Str1
:Output(2,2,"Name: "+Str1
Related to that problem, if you are trying to position some text on the screen so that it looks nice (such as centering it), the text would now be completely thrown off since there are several additional letters being displayed ('nput', 'rompt', and 'isp'). Even if you try checking to make sure that the text is the appropriate length (using the length( command), that doesn't tell you how many letters are in the function or command.
When you are dealing with many different kinds of users, especially those with little to no knowledge of TIBasic, you need to be cognizant of these kinds of problems and design your program so that it takes them into account (see usability for more information). There are a few different ways to validate user input, but one of the simplest is to create a string of acceptable characters that you check the user input against, and then tell the user if their input contained any unacceptable characters.
:"ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz→Str0
:Repeat I
:ClrHome
:Input "Name? ",Str1
:min(seq(inString(Str0,sub(Str1,I,1)),I,1,length(Str1→I
:If not(Ans
:Pause "Invalid Name!
:End
In this example, our string of acceptable characters is letters (both uppercase and lowercase), as well as a space. When the user inputs a name, we loop through all of the characters in the name and get their positions in our acceptable characters string. If any of the characters weren't in the string, then its position will be zero, and when we take the minimum of all the positions, the smallest will be zero. We then tell the user it was an invalid name and ask them to input a new name.
Sends data or a variable to a connected CBL device.
Send(variable)
While editing a program, press:
 PRGM to access the program menu.
 RIGHT to access the I/O submenu.
 ALPHA B to select Send(.
TI83/84/+/SE/CSE/CE(5.1.5+)
1 byte
The Send( command is used for sending data to a CBL (Calculator Based Laboratory) device (or another compatible device) via a link cable. With some exceptions, Send('s argument must be a variable: a real number, list, matrix, string, equation, picture, or GDB. An expression or a number will not work — Send(5) or Send([A][B]) is invalid.
The exceptions are list or matrix elements (that is, you can do Send([A](1,1)) or Send(L1(2)) without an error) and nonvariable lists typed out with { } brackets and commas.
Norland Robot
You can use Send( with a Get( for a Norland calculator robot. The format called CLR format. C stands for command number, L stands for left axle, and R stands for right axle. If the command number is 1, it makes the robot moves in a direction for the time specified later in the command. If it is 2, the robot moves until the bumper hits a wall. If it is 3, it moves for a specified amount of time and stops when the robot when the bumper hits a wall. For example, send({122,100}) will make the robot move forward for 100 centiseconds, send({222}) makes it go forward until the bumper hits the wall, and send({322,100}) makes the robot move forward for 100 centiseconds and stops it when the bumper is pressed. The last two axle control numbers are like this:
0=backwards
1=stop
2=forwards
Related Commands
Gets a variable's value from a connected calculator or CBL device.
Get(variable)
While editing a program, press:
 PRGM to access the program menu.
 RIGHT to access the I/O menu.
 ALPHA A to select Get(.
TI83/84/+/SE/CSE/CE*
1 byte
_{*OS 5.1.5 or later}
The Get( command is meant for use with the CBL (Calculator Based Laboratory) device, or other compatible devices. When the calculator is connected by a link cable to such a device, Get(variable) will read data from the device and store it to variable. Usually, this data is a list, and so you want to Get(L₁) or some other list variable.
Advanced Uses
In fact, the Get( command can also be used for linking two calculators, in which case it functions precisely like GetCalc(. This is probably for compatibility with the TI82, which used Get( rather than GetCalc( for linking two calculators. However, since this isn't a documented feature (in fact, your TI83+ manual will insist that Get( cannot be used in this way), it isn't guaranteed to work with future calculator versions.
Optimization
Nevertheless, using Get( instead of GetCalc( will make your program smaller, and probably preserve functionality.
Norland Robot
The Get( command is usually used after a Send command to confirm its transmission like this: Get(var). The variable in the parentheses is where the time of the robot's movement is stored. You can display the time moved with a Disp command.
Related Commands
Omnicalc is a TI83+/84+/SE assembly application created by Michael Vincent of Detached Solutions, and it modifies your calculator to provide additional TIBasic functions. It works by installing a parser hook which will intercept any real( command requests (although originally it actually had its own set of custom commands that it created and used). This is the same thing that xLIB does, which means that the applications could conflict when both are installed.
Some of Omnicalc's TIBasic features include:
 Base conversion for a variety of number bases
 Builtin support for several common math constants
 Factoring a number into its prime parts
 Improved linking support sending/receiving bytes
 Sprites using parts of the picture variables
Besides the TIBasic related features, Omnicalc also includes several other valuable features: a custom menu for placing common commands and functions, parentheses assistant for help entering in math expressions, protection for preventing people from messing with your calculator's memory, a thousands separators that inserts commas after every 3 digits of a number (for example, 1000000 would appear as 1,000,000), and a virtual calculator that allows you to switch back and forth between two calculators.
Documentation
Unfortunately, there isn't a whole lot of documentation that has been created for Omnicalc. The main piece of documentation thas has been created so far is the TIBasic Greyscale tutorial by Kevin Ouellet (DJ Omnimaga). This tutorial explains how to use Omnicalc together with xLIB to create greyscale sprites for use in games, although the version of xLIB that is referenced in the tutorial was just a regular assembly program. We hopefully can create some more documentation at some point in the future.
Discussions
To discuss Omnicalc, give comments, suggestion and feedback, or talk about Omnicalc tricks, you can check out the Omnicalc forum hosted at Detached Solutions or use the forum available here at this wiki.
:Pause randInt(1,6,5
:sum(2(Ans=3)+4(Ans=5
Petals around the rose is a simple dice game designed to test a person's ability to think creatively. The basic premise of the game (and where it's name comes from) is that the center dot on a dice face is the rose, and the dots around the center dot are the petals. Since your average dice face has between one and six dots, the only faces that have petals are three and five.
When you play the game, you use five dice, and you add up the values of the petals after each roll, and this is the score. The game only has three rules: the name is "Petals around the Rose", and it is significant; the answer is always even; and, anybody can give the score of the roll, but they cannot disclose its reasoning.
The routine randomly selects five numbers between one and six, and then displays them on the screen. At this point, you can have each person try to visualize what the respective numbers would look like as dice. You then just press ENTER, and the score of the roll will be displayed. Remember, you shouldn't give away the game, but instead let the other people figure it out themselves.
:ZStandard
:ZInteger
:For(X,31,31
:Horizontal X
:End
:DelVar X31→Y
:Repeat getKey
:X→S:Y→T
:X+.1Ans→X
:Y.1Ans→Y
:Line(0,0,X,Y,0
:Line(0,0,S,T
:End
In order to display the radar animation on the screen, we first need to create a friendly graphing window, setting the graph screen dimensions to X=47…47 and Y=31…31. We then make the entire screen black by drawing Horizontal lines from the bottom of the screen to the top.
Once the screen is setup, we initialize our two variables for the coordinates of the radar lines, and start drawing the radar animation on the screen. We store the two coordinates to two temporary variables, and then update the original variables to move the radar lines over a pixel. We then erase the old radar line from before, and draw the new radar line.
This gets repeated over and over again, until you press a key to quit. If you want the animation to last for a certain amount of time, you can replace the Repeat loop with a For( loop. In addition, you can use Shade(Ymin,Ymax instead of the For( loop at the beginning to shade the screen. This is smaller, although it isn't necessarily any faster.
:Repeat E10≤N and N<E11
:Input "UPC? ",N
:End
:sum(3int(10fPart(Nseq(10^(I),I,11,1
:10fPart(.1Ans+.1)1
A UPC is a barcode system that is used for different items in stores. It works by encoding numbers in bars, with different length and width bars representing different digits. When the UPC machine scans in a barcode, it reads the bars and returns if it is a valid barcode or not.
Although all of the digits are important, the last digit is especially important because it is used to detect any variance. It is commonly known as the check digit, and it is actually calculated based on the values of the other 10 digits:
 Add all of the oddnumbered position digits and multiply the value by three
 Add all of the evennumbered position digits to the previous oddnumbered value
 If the last digit of the result is zero, then the check digit is itself zero.
 If the last digit is not zero, then subtract the last digit from 10, and that is the check digit.
In order to ensure that we have a value UPC, we check to make sure that it has a value within the appropriate range. Since our UPC is an 11digit number, it should be between 10 and 100 billion.
We now loop through all of the digits, both even and odd, and get the resultant value stored in Ans. The reason this works is because the first two steps in calculating the check digit can be combined, since you are simply adding their values together. We then return the appropriate check digit, based on whether Ans is zero or not zero.
A simple guessing game using goto and lbl.
Lbl XX
AxesOff
ClrHome
ClrDraw
Text(5,15,"GUESS GAME 2.0
Text(15,20,"QUICK 20
Text(22,20,"RANDOM
Text(29,20,"IMPOSSIBLE
Text(36,20,"CUSTOM
Text(42,20,"MULTIPLAYER
Text(52,15,"MADE BY
15→X
Repeat max(K={21,105
Text(X,15,">
Repeat Ans
getKey→K
End
Text(X,15," "
X+7((Ans=34 and X<42)(Ans=25 and X>15→X
End
If Ans=15
Goto A1
If Ans=22
Goto B1
If Ans=29
Goto C1
If Ans=36
Goto D1
If Ans=42
Goto E1
Goto E1
Lbl A1
ClrHome
randInt(1,20)→A
Lbl A2
Input "Guess:",B
If B=A
Goto A3
If B>A
Disp "LOWER"
If B<A
Disp "HIGHER"
Goto A2
Lbl A3
ClrHome
Output(4,1,"CONGRATULATIONS!"
Output(5,4,"YOU GOT IT!")
Pause
Goto XX
Lbl B1
ClrHome
Disp "THE FOLLOWING"
Disp "CAN BE FROM"
Pause "12 TO 150000"
ClrHome
randInt(1,50000)→A
randInt(1,A)→B
Lbl B2
Input "GUESS:",C
If C=B
Goto A3
If C>B
Disp "LOWER"
If C<B
Disp "HIGHER"
Goto B2
Lbl C1
ClrHome
Output(5,5,"WARNING")
Pause
ClrHome
Disp " "
Disp "YOU ARE ENTERING"
Pause "THE IMPOSSIBLE"
ClrHome
randInt(1,100000000000000)→A
Lbl C2
Input "GUESS:",B
If B=A
Goto Lbl C3
If B>A
Disp "LOWER"
If B<A
Disp "HIGHER"
Goto C2
Lbl C3
Pause "OH MY GOD"
ClrHome
Output(5,3,"NO LIFE ALERT!")
Pause
ClrHome
Disp "I AM APPALLED"
Disp "BY HOW BORED"
Disp "YOU ARE"
Disp "GO SHOW "
Pause "THIS SCREEN"
Goto XX
Lbl D1
ClrHome
Disp "RANDOM NUMBER"
Input "FROM:",X
Input "TO:",Y
randInt(X,Y)→A
Lbl D2
Input "Guess:",B
If B=A
Goto A3
If B>A
Disp "LOWER"
If B<A
Disp "HIGHER"
Goto D2
Lbl E1
ClrHome
Disp " "
Disp "TYPE IN A"
Disp "NUMBER FOR"
Pause "FRIEND TO GUESS"
ClrHome
Input "ANSWER:",A
ClrHome
Lbl E2
Input "Guess:",B
If B=A
Goto A3
If B>A
Disp "LOWER"
If B<A
Disp "HIGHER"
Goto E2
Converts a decimal number to a fraction.
Ans  the number you want to convert to a fraction
Ans  the fraction in list format
Ans, X
TI83/84/+/SE
Weregoose
URL: United TI
:Ans→X:{1,abs(Ans
:Repeat E‾9>Ans(2
:abs(Ans(2){1,fPart(Ans(1)/Ans(2
:End
:round({X,1}/Ans(1),0
:Ans/gcd(Ans(1),Ans(2
Although there is a ►Frac command available for converting a decimal number to a fraction, this is only a formatting command and doesn't actually give you the numerator and denominator as separate numbers. This limits your choices for using fractions, especially since ►Frac only works with the Disp and Pause commands. In addition, it does not work very well, and fails for several inputs that you would think are within its ability to figure out (such as 1.3427625). Fortunately, you can improve upon the ►Frac command by using your own routine.
The basic algorithm that you use when converting a number to a fraction is commonly known as the Euclidean algorithm. While it has been around for literally millennia, it is still one of the best algorithms because of its sheer simplicity (it doesn't require any factoring or other complex math operations).
The way it works is that you have two numbers (in our routine, it's one and the decimal number you input), and you divide the first number by the second number, and check to see if there is a remainder. If there is a remainder, you then repeat the process again, except this time you swap the numbers. This process is repeated over and over again until the second number is equal to zero, at which point you will have your desired fraction.
One thing you will probably notice is that we aren't actually checking for zero in the Repeat loop. Because of the way that TI designed the TIBasic language, each number has a limited amount of precision. As a result, any math calculations that involve extremely small or large numbers will produce rounding errors that don't return the right number. The easiest way to deal with this problem is by checking for a really small number (in this case, _{E}‾9).
Displays Conway's Game of Life on the screen.
∟X  the list of X coordinates
∟Y  the list of Y coordinates
None
∟X, ∟Y, ∟P, ∟Q, S, X, Y
TI83/84/+/SE
DarkerLine
URL: United TI
:Plot1(Scatter,X,Y,.
:∟X→P:∟Y→Q
:Repeat getKey or S<2
:∟P→X:∟Q→Y
:DispGraph
:DelVar ∟PDelVar∟Q1→S
:For(X,min(∟X)1,1+max(∟X
:For(Y,min(∟Y)1,1+max(∟Y
:sum(1=max(abs(∟XX),abs(∟YY
:3=Ans or 3=Ansmax(∟X=X and ∟Y=Y
:If Ans:Then
:X→∟P(S
:Y→∟Q(S
:S+1→S
:End:End
:End:End
:PlotsOff
:ClrHome:"
Conway's Game of Life is a game designed to model how a simple environment evolves over time. Although it is called a game, it is not really a game, since it has no players and it operates on its own. The basic functionality involves moving pieces around the screen, with a black pixel being considered alive and a white pixel being considered dead.
A piece can move in any of the eight directions, and the basic rules it follows are: a pixel stays alive if it has two or three live neighboring pixels, and a dead pixel becomes alive if it has exactly three live neighboring pixels. The different patterns and shapes that emerge all depend on the pieces that you start out with.
In order to setup the pieces, we need to store the X and Y coordinates in the respective ∟X and ∟Y lists. There are a couple things you need to remember: the screen is 94x62, so those are the maximum numbers you can use for coordinates; there needs to be a corresponding Y coordinate for every X coordinate, otherwise you will get a ERR:DIM MISMATCH error.
We use a stat plot for displaying the pieces because it has builtin functionality for working with lists, and storing the pieces in lists is more efficient than any of the other alternatives available. In addition to the two main coordinate lists, we also create two other temporary lists (∟P and ∟Q).
These two lists are used for storing all of the different movements by the pieces. When we have finished checking all of the pieces to see if any of them should be moved (based on the game rules), we update the coordinates lists, and store the new coordinates of the pieces to the ∟X and ∟Y lists. We repeat this over and over again for the life of the game.
Displaying and checking the pieces should take only a few seconds, but it all depends on the number of pieces that you choose to use; fewer pieces will be faster, and likewise more pieces will be slower. When you are done using ∟X, ∟Y, ∟P, and ∟Q, you should clean them up at the end of your program.
Example of Inputting Hex Code
There are all sorts of small assembly programs that you can create simply using the calculator's builtin assembly commands (specifically, AsmPrgm), along with the appropriate hexadecimal code. In order to run a program, you need to use the Asm( command, where Asm(prgmPROGNAME is the program that contains the hexadecimal code.
As a word of caution, when entering in the hexadecimal, you need to be very careful that you type it in exactly as you see it. If there is a single incorrect character, the calculator might crash and reset your RAM when you turn it on again. We have tested the hexadecimal codes to make sure they work, but it's up to you to enter them in correctly.
Also note that these programs may not work on the original TI83, only the 83+ or higher. Most are harmless, but the last one specifically will crash.
Many of the codes no longer function on the TI84+CSE or TI84+CE. The new codes for these calculators can be found here.
Table of Contents

Toggle Program Mode
:AsmPrgm21F8893E02AE77C9
When used in a program, it allows you to use Archive and UnArchive on other programs. Make sure to switch back to "program mode" when you're done by running the program again.
When used on the home screen, it allows you to use programming commands like If and For(; this has limited utility, but maybe it's useful to check a short bit of code without creating a new program for it.
Screen to Graph
:AsmPrgm214093EF7B4CC9
This will put the current screen image on the graph screen.
Quick Key
:AsmPrgm3A3F84EF8C47EFBF4AC9
This is a getKey routine that makes all keys repeat, not just arrows and there is no delay between repeats. The key codes are different, so you might need to experiment.
Text Inverse
:AsmPrgm21F5893E08AE77C9
This will switch from normal text mode to inverse (white text on black background) and vice versa.
Lowercase
Lowercase On
AsmPrgmFDCB24DEC9
Lowercase Off
AsmPrgmFDCB249EC9
Lowercase Toggle
AsmPrgm21148A3E08AE77C9
This will toggle lowercase on or off
Fill Screen
Clear, Black, & Invert Screen
LCD Clear
AsmPrgmEF4045C9
This only clears the LCD, it doesn't actually clear the graph screen or homescreen
White
AsmPrgm210000115F3FEF5C4DC9
This fills the graph screen with white pixels. This is not like ClrDraw, as it won't update graphs or plots.
Black
AsmPrgm210000115F3FEF624DC9
This fills the graph screen with black pixels
Invert
AsmPrgm210000115F3FEF5F4DC9
This inverts the contents of the screen, drawing it to the graph screen.
Border
AsmPrgm210000115F3FEF7D4DC9
This draws a border around the graph screen.
White Border
AsmPrgm210000115F3FEF864DC9
This draws a border of white pixels around the graph screen.
Black Border, Clear Inside
AsmPrgm210000115F3FEF8C4DC9
This will draw a black border around the graph screen, clearing the contents inside.
Change contrast level
Set Contrast
The input is a value between 0 and 39 in Ans (if you use something else, the program will ignore it), with 0 corresponding to the lowest contrast value, and 39 to the highest. The number displayed by the OS in the top right corner of the screen when you change the contrast with 2nd+UP and 2nd+DOWN is 1/4 of this value, rounded (so a displayed 6 corresponds to a value between 24 and 27 when using this program).
AsmPrgmEFD74AEFEF4AC6D8D8D3107B324784C9
Get Contrast
This gets the OS contrast level and stores it in Ans:
AsmPrgm3A4784EF8C47EFBF4AC9
Decrease Contrast
AsmPrgm2147847ED601D835C6D8D310C9
Decrease the contrast by one unit (this will be ignored if the contrast is at minimum already).
Increase Contrast
AsmPrgm2147847EC6D9D834D310C9
Increase the contrast by one unit (this will be ignored if the contrast is at maximum already).
Run Indicator
Run Indicator Off
AsmPrgmEF7045C9
Run Indicator On
AsmPrgmEF6D45C9
Toggle Run Indicator
AsmPrgm21028A3E01AE77C9
Note that when this routine turns the run indicator off, it doesn't erase the run indicator, it simply stops it. You can do this yourself — either by outputting something to the top right corner, or by clearing the screen (ClrDraw or ClrHome, doesn’t matter).
Simulated Key Presses
Alpha Lock
AsmPrgmFD361251C9
This simulates [2nd][Alpha]
Alpha Lock (No disable)
AsmPrgmFD3612D1C9
This is the same as the first, but you have to press [2nd][mode] to disable it.
Lowercase Press
AsmPrgmFD361231C9
This works even if lowercase isn't enabled.
Lowercase Lock
AsmPrgmFD361271C9
This simulates [2nd][Alpha][Alpha].
Lowercase Lock (No disable)
AsmPrgmFD3612B1C9
This can only be disabled by pressing [2nd][mode]
Alpha Off
AsmPrgm21028A3E0FA677C9
Alternatively:
AsmPrgm3E01FD7712C9
[2nd]
AsmPrgmFDCB12DEC9
An interesting use of these codes can be for prompting user input (If you run Alpha Lock, for example, Input will start with an Alpha press.
If you run the Alpha Lock that can't be disabled at the start of your program and a user presses ON (or an error occurs), you will not be able to select the options, so you are forced to press [2nd][mode].
Disabling "Done" Message
To disable the "Done" message at the end of a Basic program:
AsmPrgmFDCB00AEC9
UnDirty Graph Screen
:AsmPrgmFDCB0386C9
This will mark the Graph Screen as not dirty. Using ClrDraw will mark the Graph Screen as dirty so the next time it is displayed the screen will be cleared. Many ASM libraries (such as xLIB) modify the graph buffer without displaying the screen which might be unintentionally cleared.
Turn Calculator Off
With turning the calculator off, you have options. You can either turn the screen off (your program will continue running, but the calculator will look like it’s turned off) or actually turn the calculator off and wait for the [on] button to be pressed.
LCD Off
AsmPrgm3E02D310C9
LCD On
AsmPrgm3E03D310C9
Toggle LCD Power
AsmPrgmDB10CB6F3E0220013CD310C9
Calculator Off
AsmPrgm3E01D303FB76FDCB09A6C9
Turn the calculator off; wait for [on] key before continuing:
Finally, exit the program and turn the calculator off (i.e., once you turn the calculator back on, it will be at the home screen):
Note, this eats free RAM, so avoid using this!
:AsmPrgmEF0850
Auto Calc
Auto DMS
AsmPrgmFD360A06C9
Auto DMS displays all decimals in DegreesMinutesSeconds on the home screen, automatically.
Auto Fractions
AsmPrgmFD360A0CC9
Auto Fractions will display decimals as fractions (if it can) on the home screen, automatically.
Screen Shifting
Note: These routines do not automatically update the LCD. This can be forced by replacing the ending C9 with EF6A48C9.
Shift Screen Right 1
:AsmPrgm2140930E40060CB7CB1E2310FB0D20F5C9
This shifts the graph screen right by one pixel. See the note here for updating the screen.
Shift Screen Left 1
:AsmPrgm213F960E40060CB7CB162B10FB0D20F5C9
This shifts the graph screen left by one pixel. See the note here for updating the screen.
Shift Screen Up 1
:AsmPrgm214C9311409301F402EDB0EB010C00EF304CC9
This shifts the graph screen up by one pixel. See the note here for updating the screen.
Shift Screen Down 1
:AsmPrgm213396113F9601F402EDB823010C00EF304CC9
This shifts the graph screen down by one pixel. See the note here for updating the screen.
Shift Screen Right 4
:AsmPrgm2140930E40AF060CED672310FB0D20F5C9
This shifts the graph screen right by four pixels. See the note here for updating the screen.
Shift Screen Left 4
:AsmPrgm213F960E40AF060CED6F2B10FB0D20F5C9
This shifts the graph screen left by four pixels. See the note here for updating the screen.
Shift Screen Up 4
:AsmPrgm21709311409301D002EDB0EB013000EF304CC9
This shifts the graph screen up by four pixels. See the note here for updating the screen.
Shift Screen Down 4
:AsmPrgm210F96113F9601D002EDB823013000EF304CC9
This shifts the graph screen down by four pixels. See the note here for updating the screen.
Memory Functions
Free RAM
Get the amount of free RAM left in Ans
AsmPrgmEFE542EF9247EF5641EFBF4AC9
Archiving
AsmPrgm
EFD74AD604C0 ;Get the pointers to Ans
EB4E234623 ;Get the size and location of the string
117884EDB012 ;Copy it to OP1
EFF142D8 ;Locate the var, exit if it doesn't exist
78B7C0 ;Exit if it is already archived
EFD84FC9 ;Archive it and exit
Input: Ans is a string with the name of the variable to archive. The name needs a prefix byte to determine what type of variable it is. Some of them are:
and Real/Complex
A List
B Matrix
C Equation
D String
[ Program/Protected program
E Program/Protected program
F Program/Protected program
G Picture
H GDB
U Appvar
"[TEST
"ETEST
"FTEST
Unarchiving
AsmPrgm
EFD74AD604C0
EB4E234623
117884EDB0
12EFF142D8
78B7C8 ;Only difference
EFD84FC9
Input: See Archiving.
ToggleArch
AsmPrgm
EFD74AD604C0
EB4E234623
117884EDB0
12EFF142D8
EFD84FC9
Input: See Archiving.
Reset Defaults
AsmPrgmEF2851C9
Reset RAM
AsmPrgmEF4E40C9
AsmPrgmC7
DelVar
AsmPrgm
EFD74AD604C0
EB4E234623
117884EDB0
12EFF142D8
EFC64FC9
Input: See Archiving.
Miscellaneous
Remove Cursor
AsmPrgmFDCB0CE6C9
This is harmless, but it stops displaying that blinking cursor :D Just press [2nd][MODE] to put it back to normal. What, jokes are allowed, right?
Edit Lock/Unlock Program
We are generally an open source community, so this should be fun. To toggle the lock status of a program:
:AsmPrgmEFD74AFE04C03CEB4E234623117884121CEDB0AF12EFF142D8EE0377C9
Please note that you should avoid editing an assembly program using this code. It will likely get messed up and it could cause it to be volatile. The program name will be in Ans, as a string. For example, "HELLO":Asm(prgmLOCK
Battery Check
This is a "smart" battery check, that detects if the calc is an 84+ or an 83+. If it is a TI83+, either a 0 or 4 is stored to Ans. If it is a TI84+, a value from 0 to 4 is stored to Ans. 0 implies a low battery, 4 implies a good battery, and anything in between is just that.
AsmPrgm
EF6F4C3D280A78FE1E
3805
EF21521808
EFB3503E042001AF
EF8C47EFBF4AC9
ASCII
Display an ASCII character at the last cursor position, using Ans (0 to 255)
AsmPrgmEFD74AEFEF4AEF0445C9
Display a string of ASCII characters using a list in Ans (use values 0 to 255):
AsmPrgmEFD74A3DC0EB462323C5EF7A41E5EFEF4AEF0445E1C110F1C9
An example of using this might be:
:65+{7,4,11,11,14
:Asm(prgmASCII
That will display "HELLO" and if you change the 65 to a 97, it will disply "hello"
Error
This code will cause an error to be thrown, based on the value in Ans. The values correspond to the ones found here. Use your browser's search tool to look for "E_Overflow" which is Error 1. By default, there is no Goto option unless you add 128 to the values. So for example, for a divide by zero error with a goto option, use 130 as the error code.
AsmPrgmEFD74AEFEF4AEFD744C9
Token generator
This code is useful if you want to access an arbitrary token given its hex code. For instance, suppose you want to get the PrintScreen token, which has hex code 91. Write
:AsmPrgmEFF1423605C9
:91
where the last line has the hex code of the token or tokens you want.
To use this, first compile the program with the AsmComp( command, then run the compiled version with the Asm( command. This will unlock the compiled program for you in the program editor. When you edit it, you'll see a bunch of garbage characters, followed by the token you wanted.
Advanced
These codes are long and involved, so be careful with putting them in. However, they are very useful.
CharLength
EFD74AD604C0
6F67EB
4E234623EB
C5D5E51A
EFA342F5
EBEF9445
F1E1D109C1
20020B13
0B1378B120E5
EF9247
EF5641
EFBF4A
C9
This will return how many characters are in the string (the string is in Ans). For example, "sin(ln(2))" would return 10.
String Pixel Width
EFD74AD604C0
676FEB
4E234623EB
C5D5E51A
EFA342F5
EBEF9445
218D8477EFB44C06004F
F1E1D109C1
20020B13
0B1378B1
20DB
EF9247
EF5641
EFBF4A
C9
This returns how wide a string is in pixels.
ListToVars 1
EFD74AFE01C0
1AFE1B38023E1B
EB232347
3E41
C5F5E5F5
EFC541F1
327984
D73003EF0F43
E1010900EDB0
F13CC110E4
C9
If Ans is a list, each element will be stored to a Real var, starting with A and incrementing through each var until the list is done. For example, {0,4,3,12,8,24} will store 0→A, 4→B, 3→C, 12→D, 8→E, 24→F
ListToVars 2
EFC5413EAA327984
D7300F
3E40061B21EC86
3C772310FB
11EA861313D5
EFD74AFE01C0
1AFE1B38023E1B
EB232347
D11A13D5
C5E5F5
EFC541F1
327984
D73003EF0F43
E1010900EDB0
C110E3
D1C9
If Str1 contains the list of variables to write to and L1 has the list of values to write, this program will write the values to the variables. For example:
:"ADCZQGB→Str1
:{0,1,1,2,3,5,8
:Asm(prgmL2V2
Then result will be:
:A is 0
:D is 1
:C is 1
:Z is 2
:Q is 3
:G is 5
:B is 8
ExecAns
EFD74A
FE04C0
215500 ;55 is the token for "U"
22EC86227984
21F086
EB4E234623
ED43EE86
EDB0
3E05327884
EFF142
3803EFC64F
3E0521EC86
EF3C4C
C9
Ans is a string, as input. This will delete prgmU, then copy Ans to prgmU and run it, whether it is assembly or BASIC code.
RepeatKeys
180A
83473A4584323F8478C9
2100807EFE83
2006AF77323F84C9
11979DEB018000EDB0
DB06210080EF664FC9
This will set a hook that causes all keys to register very quickly. On top of that, all keys repeat. Note that this will not activate during program execution. Run this program again to deactivate
FastKeys
1809
83473E0132428478C9
2100807EFE83
2006AF77323F84C9
11979DEB018000EDB0
DB06210080EF664FC9
This will cause repeating keys (like the arrows or [Del]) to repeat very quickly.
MultiKeys 2
017F07210000545C
CB0179D301E5E1DB012FB720083E08856F10ED180E
C506082C0F30025C6510F8C110DD
7CB720016F
6C62
7BB7280A
444D2909290929292919
EF9247
EF5641
EFBF4A
C9
This returns a unique key code for any combination of one or two key presses. Values are 0 to 3191.
Sprite
EFDA4AEFEF4A
626B
19192929E5
EFE04AEFEF4A
1693CBF3E119E5
EFD74AE1FE04C0
1313
010C08
CDCC9DCDCC9D780600094710F3
EF6A48
C9
1AC6C03002D607ED6F13C9
This will draw an 8x8 sprite to the graph screen using Ans as the hex string of data, X and Y as coordinates. Y can be anywhere from 0 to 56, X should be 0 to 11 (It draws to every eighth pixel). The string should be 16 characters long, each character is a hex value that corresponds to the on/off state of 4 pixels. So the string "3C42A581A599423C" would draw a smiley face.
References
 Many of these codes (the original ones) come from DarkerLine's Blog, and the last hexcode in particular for turning off the calculator comes from chipmaster.
 For more opcodes, see the discussions on ASM Programming or Assembly Hex Codes.
 Many codes come from "Zeda's Hex Codes"
Saves the current window settings.
ZoomSto
Press:
 ZOOM to access the zoom menu.
 RIGHT to access the MEMORY submenu.
 2 to select ZoomSto, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The ZoomSto command backs up all window settings applicable to the current graphing mode (those that are shown in the WINDOW menu) to backup variables used specifically for this command. These backup variables are found in the VARS>Zoom… menu, and are distinguished by a Z in front of their name. For example, Xmin is backed up to ZXmin, PlotStart is backed up to ZPlotStart, etc.
Using ZoomRcl, these backup variables can be used to overwrite the current window settings, recalling the saved window.
One source of confusion with this command can be the fact that ZoomSto and ZoomRcl only deal with the current graphing mode (and don't touch settings from other graphing modes), but some window variables are shared by graphing modes. So some saved zoom variables only applicable to one mode, such as ZTmin, can be from older saves than those applicable to all modes, such as ZXmin.
Error Conditions
 ERR:INVALID occurs if this command is used outside a program (but not if the menu option is used, of course).
Related Commands
Zooms in to a smaller graphing window defined by a box drawn by the user.
ZBox
Press:
 ZOOM to access the zoom menu.
 ENTER to select ZBox.
TI83/84/+/SE
1 byte
The ZBox command allows the user to select a smaller window within the current graphing window to zoom in to. To select the window, use the arrow keys and ENTER to select one corner of the window; then as you use the arrow keys and ENTER to select the other corner, a rectangle of the window's dimensions will be shown.
It's not recommended to use this in most programs, because entering an empty window (with no width or no height) will cause an error and exit the program without letting it clean up.
Error Conditions
 ERR:INVALID occurs if this command is used outside a program.
 ERR:ZOOM is thrown if an empty window is selected (with no width or no height)
Related Commands
Allows the user to draw on the graph screen.
Pen isn't a command, it's a menu option.
From the home screen, press:
 2nd PRGM to enter the DRAW menu
 Scroll up to select Pen, or use arrows.
TI83/84/+/SE
The Pen tool allows you to draw on the graph screen using a + cursor for the "pen", similar to what you see when accessing the graph screen with graphs or with the Input command. You can find Pen by pressing [2nd][PRGM] to go to the DRAW menu, but it is only accessible from the calculator's home screen (where you do math and run programs); it won't show up when you are inside the program editor.
You use the arrow keys to move the pen around, and you can press [2nd][<] and [2nd][>] to move five pixels over instead of just the typical one (this does not work with the up or down keys, since that would change the calculator's contrast). Pressing ENTER starts or stops the drawing respectively, and you just have to press CLEAR twice to return back to the home screen.
When you are done drawing, the calculator stores the coordinates of the cursor to the respective graph screen variables (R and θ for PolarGC format, otherwise X and Y).
Unfortunately, anything that you draw with Pen will be erased or overwritten whenever another program accesses the graph screen or somebody graphs something, so you should store it to a picture if you want to keep it for future use.
Even more unfortunately, you can't erase pixels with Pen. If you're the type of person who makes mistakes once in a while, it might be better to go to the graph screen and choose PtChange( from the DRAW menu. This will require you to press ENTER for every pixel you want to draw, but it will also allow you to erase a pixel (by drawing to it again).
Returns the factors of a number.
X  the number you want to factor
L₁  the factors of the number
X, L₁, Ans
TI83/84/+/SE
Weregoose
URL: United TI
:{1→L₁
:Repeat Ans=1
:2:While fPart(X/Ans
:Ans+1
:End
:Ans→L₁(1+dim(L₁
:X/Ans→X
:End
Number factorization breaks a number up into its factors  smaller numbers that that are multiplied together to create the number. For example, the number 100 can be broken up into the factors 2*2*5*5. It can also be represented as 10*10, or 5*20, but for the sake of completeness, this routine finds prime factors — which can't be broken down themselves (2*2*5*5 is such a factorization, since there's no way to factor 2 or 5, but 5*20 isn't, since 20 can still be factored).
In order to start collecting the factors of the number, we create a list with the initial factor of 1 (because 1 is a factor for every number). We then begin looping through numbers, starting with 2, to find the next factor. The way we determine if we have a factor is by dividing the original number by the respective number we are at, and checking if there is a remainder.
If there is a remainder, we know that the number is not a factor, and we then increment it and continue looping. If there is no remainder, however, we have found a factor, and thus the loop will end. We then add that factor as the next element in our factors list, and divide the original number by that factor and set the result as the new number. This gets repeated over and over again until we have our list of factors.
The factors list should be generated pretty quickly, but it all depends on the original value that you chose for X; a smaller value will be faster, and likewise a larger value will be slower. In addition, if you try starting with a negative number or a number with a decimal part, then the program will not work correctly.
When you are done using L₁, you should clean it up at the end of your program.
Clears saved calculations for the table screen.
ClrTable
While editing a program, press:
 PRGM to access the program menu.
 RIGHT to access the I/O submenu.
 9 to select ClrTable.
TI83/84/+/SE
1 byte
The ClrTable command clears all calculations for the table screen shown if you press 2nd TABLE. That is, all alreadycalculated values in the table are cleared, and TblInput is deleted. In IndpntAuto and DependAuto mode, this usually isn't noticeable because the table will be recalculated almost immediately when you next look at it (unless one of the entered functions is so complicated it takes a while to calculate). This mainly has an effect in IndpntAsk or DependAsk mode, where the corresponding parts of the table will be cleared entirely.
Advanced Uses
As a side effect, ClrTable seems to have all the effects of ClrDraw — it clears the graph screen, and any equations or plots will be regraphed the next time the graph screen is displayed.
Command Timings
ClrTable and ClrDraw take the same amount of time to clear the screen.
Related Commands
Command Summary
Raises 10 to a power.
Command Syntax
10^(value)
Menu Location
Press [2nd] [10^{x}] to paste 10^(.
Calculator Compatibility
TI83/84/+/SE
Token Size
The 10^( command raises 10 to a power. Since it's possible to just type out 1, 0, ^, and (, the reason for having a separate function isn't immediately obvious, but the command is occasionally useful.
10^( accepts numbers and lists as arguments. It also works for complex numbers.
10^(2)
100
10^({1,0,1})
{0.1 1 10}
Optimization
Don't type 10^( out, use this command instead. It's three bytes smaller and usually faster as well. However, keep in mind that you might be able to use the E command instead of 10^(, for constant values.
Command Timings
The command 10^( is faster than typing out 10^( in most cases, except for small integer arguments. Even faster is E, but that only works for raising 10 to a constant power.
Related Commands
Computes the (principal branch of the) base 10 logarithm.
log(value)
Press the LOG key to paste log(.
TI83/84/+/SE
1 byte
The log( command computes the base 10 logarithm of a value — the exponent to which 10 must be raised, to get that value. This makes it the inverse of the 10^( command.
log( is a real number for all positive real values. For negative numbers, log( is an imaginary number (so taking log( of a negative number will cause ERR:NONREAL ANS to be thrown in Real mode), and of course it's a complex number for complex values. log( is not defined at 0, even if you're in a complex mode.
Advanced Uses
Using either the ln( or the log( command, logarithms of any base can be calculated, using the identity:
(1)So, to take the base B log of a number X, you could use either of the following equivalent ways:
:log(X)/log(B)
:ln(X)/ln(B)
This is the exponent to which B must be raised, to get X.
The base 10 logarithm specifically can be used to calculate the number of digits a whole number has:
:1+int(log(N))
This will return the number of digits N has, if N is a whole number. If N is a decimal, it will ignore the decimal digits of N.
Error Conditions
 ERR:DOMAIN when calculating log(0).
 ERR:NONREAL ANS if taking log( of a negative number in Real mode.
Related Commands
Computes the (principal branch of the) natural logarithm.
ln(value)
Press the LN key to paste ln(.
TI83/84/+/SE
1 byte
The ln( command computes the natural logarithm of a value — the exponent to which the constant e must be raised, to get that value. This makes it the inverse of the e^( command.
ln( is a real number for all positive real values. For negative numbers, ln( is an imaginary number (so taking ln( of a negative number will cause ERR:NONREAL ANS to be thrown in Real mode), and of course it's a complex number for complex values. ln( is not defined at 0, even if you're in a complex mode.
Advanced Uses
Using either the ln( or the log( command, logarithms of any base can be calculated, using the identity:
(1)So, to take the base B log of a number X, you could use either of the following equivalent ways:
:log(X)/log(B)
:ln(X)/ln(B)
This is the exponent to which B must be raised, to get X.
Error Conditions
 ERR:DOMAIN when calculating ln(0).
 ERR:NONREAL ANS if taking ln( of a negative number in Real mode.
Related Commands
Assembly libraries are commonly used by TIBasic programs to provide features that enhance them. Since TIBasic programs don't have access to any of the internal functions of the calculator and the peripherals, assembly libraries can bridge that gap. The only caution about using assembly programs is that you need to make sure to include the assembly program if you give your program to someone else.
 Auto PowerDown — This tool allows BASIC programmers to implement an APD feature into their main loop. An example is included. An 84+ is recommended (but not altogether necessary) to implement this into a BASIC program. Note: This program will work with OnBlock. Even if OnBlock is enabled, when using this program, the user will be able to turn the calculator back on and continue with the execution of the program.
 BASIC Tools — BASIC Tools is a really neat set of assembly programs which can be used to allow BASIC programs to have really neat featues. BASIC Tools allows BASIC programs to inverse text, power off the calculator midprogram, change the contrast level, shift the screen up, determine the current contrast level, enable alphalock, determine the amount of free RAM, and check the batteries!
 CELTIC — This is an ASM utility to be used with BASIC programs that will empower BASIC programs to perform a variety of functions that BASIC would not previously allow, including the ability to read or write appvars and programs and swap variables between RAM and Archive.
 Codex — This is an awesome asm utility for basic programmers. It includes 32 assembly functions that basic programmers can use. It is centered mostly upon graphical functions. Yet there are some other miscellaneous functions. I believe it is one of the most complete utilities for basic programmers.
 Custom pics — This program allows you to save an unlimited number of pics with custom names. The pictures are stored in lists of 786 bytes. program size:182 bytes. my first ASM program. No shell needed.
 Flash Gordon — It's the famous Flash Gordon, with two subroutines that I've written to make this great program less of a pain in a neck. Basically, what it does is that you run this, and you don't have archive/unarchive your programs: they all stay in the archive, which means faster loading and less wear and tear on the flash memory.
 Graph Screen Wipes — This is a collection of 8 screenwipes. They will take whatever is in the graph buffer and move it up, left, down, right, up+left, up+right, down+left or down+right. Useful as a subroutine in either basic or assembly programs. Same principle behind sidescrolling games… except this shows how to do diagonal as well as left, right, up and down. 2nd release: Bugfree as far as I know. Also contains a demo program to demonstrate what it does. 3rd release: Now supports user defined scrolling amounts (store a number in X, and the screen will be scrolled that many lines).
 GreyPic8x — This program takes three pics (pic1, pic2 & pic3) and converts them into a greyscale screen. Very useful for Basic programmers if they want a greyscale title picture.
 Instant Graph Inverse — This program takes the graph buffer and inverses it (very quickly). Very useful as a subroutine for either basic or assembly programs.
 InstCirc — InstCirc is an ASM program designed to be callable from within TIBASIC programs. It allows BASIC users to create circles much faster than the built in TIOS routine. This is NOT another 4part circle drawing flag enabler that so many other fast circ programs are.
 Inverter — The impetus for this program came from all the *low quality* BASIC graphics programs I've seen posted at ticalc.org, most of which deal with inverting large portions of the screen. Well, in my humble opinion, that sort of thing is best handled in ASM instead. Thus, here is an exceedingly fast and small full screen inverter. It inverts the screen instantaneously and is only 36 bytes!
 Omnicalc — Omnicalc integrates additional functionality into your 83+'s operating system. For example, it adds more functions for BASIC programmers, base conversions, and compressed programs, among other things. This latest version provides bug fixes, including the ability to now transfer and group BASIC programs using Omnicalc functions.
 OnBlock — A simple program that installs an interrupt that blocks the use of the On Break in basic programs.
 Picture Manager — This program merges the capabilities of ZPIC, ZSTO and a few new functions into 1 program. Basically, you can archive/unarchive/delete/recall/store up to 255 different pictures on your calculator! It also returns various error codes in case something went wrong (like bad input), so the program wont error out! This is MOST useful in graphicsintensive programs, like BASIC picture editors and BASIC games.
 RAGE — It accepts lists now instead of several vars. Also, the best improvement is the new support of user defined sprites. Games like Tetris, Duckhunt, Chess, Checkers, and Monopoly are now easily possible in Basic. Check it out if you'd like an alternative to xLib or Omnicalc, as this takes up less than 1K and is fully customizable.
 Resource — This routine is very useful for everyone. You can save a lot of free RAM memory when using Resource. It copies programs (TIBasic and Asm) to RAM from Archive; so they only need free RAM when they are running! The routine could be used within TIBasic programs or standalone at home screen!
 Screen Shot Maker — This program lets you take a screen shot of the graph and saves it as an assembly program. The new program, when you run it, copies the picture to the graph and displays it. This is useful for Basic programmers that are writing graphicsheavy programs and have run out of pics. This version is bugfree. If you don't like the program much, it does have a nice string input routine you might like.
 Symbolic — This application installs new functions onto your calculator. These can be used anywhere in the TI83+ OS. These functions include a symbolic differentiation and simplification. Great for a lot of math classes.
 TLIB — This library is written for BASIC programmers who want to use ASM's advantages without having do learn this difficult language ! With TLIB, you can :  Run the indicator OFF  Clear the screen with horizontal and vertical lines (it is not really faster than BASIC : 6sec instead of 8sec )  Do a pause (with a countdown)  Switch off the calculator  Inverse all the pixels of the plot screen  write in video inverse mode  and cancel this "video inverse mode".
 Variable Status — This little package can identify if a variable/program/whatever exists and whether or not it is archived. It can also determine if a program is ASM or BASIC!
 XKeys — A library that allows BASIC to detect multiple key presses. I've also included a demo that shows how to detect the arrow keys. The readme explains in more detail and includes a key code chart. This was designed with games in mind so it is small, fast, and easy to use. This version does not use interrupts or any safe RAM areas, so it should be safe to use with other libraries.
 xLIB — An APP that adds functionality to TI83/4+ BASIC programs. It installs a parser hook which will intercept any real( requests. See the xLIB article for more information about it.
 Xtravar Beta 1 — Xtravar Beta 1 is a noshell assembly program that lets you use up to 256 different strings, matrices, pics, etc. It also lets you use special characters. The best part is that you can send your program to other calcs and they won't need this program to run it!
 ZBASIC Library — ZBASIC is a set of 10 ASM routines which BASIC programs can access and use. These include inverting the screen, getting free RAM amount, setting/checking contrast level, getting battery status, shifting the screen up, etc.
 ZBTools — Assembly Tools for Basic Programmers. It provides several useful functions for TIBasic programmers.
 **Celtic III**  Celtic III is a Flash Application for the TI83 Plus, TI83 Plus Silver Edition, TI84 Plus, and the TI 84 Plus Silver Edition graphing calculators [ TI83/84+(SE) , designed to extend the functionality of these calculators so that BASIC games and utilities can perform actions that cannot easily be done through the language itself. Celtic III includes all commands from Xlib and some from OmniCalc.
Zooms to a larger graphing window with the same center.
Zoom Out
Press:
 ZOOM to access the zoom menu.
 3 to select Zoom Out, or use arrows and ENTER.
TI83/84/+/SE
1 byte
Outside a program, the Zoom Out tool allows you to pick a point on the graph screen and change the graphing window to a larger one centered at that point. The Zoom Out command, used in a program, also changes the graphing window to a larger one, but doesn't let you pick a point — it uses the center of the screen.
The variables XFact and YFact are used to determine how much the graphing window changes: the total width of the screen, XmaxXmin, is multiplied by XFact, and the total height, YmaxYmin, is multiplied by YFact. Because you can't store a value less than 1 to either of these variables, the screen is guaranteed to get no smaller.
Aside from Xmin, Xmax, Ymin, and Ymax, no window variables are modified by this command (although ΔX and ΔY change as they are defined).
Error Conditions
 ERR:INVALID occurs if this command is used outside a program.
 ERR:ZOOM is thrown if an overflow occurs calculating the new window dimensions (the window is too big)
Related Commands
xLIB is a TI83+/84+/SE assembly application created by Patrick Prendergast (tr1p1ea), and it adds additional functionality to TIBasic programs. It works by installing a parser hook which will intercept any real( command requests.
Some of its features include:
 Fast sprites/tilemapping
 Faster key routines
 Scrolling the screen
 Executing archived programs
Documentation
Unfortunately, there isn't a whole lot of documentation that has been created for xLIB. The three main pieces of documentation that have been created so far include the readme file itself, a tutorial heavily based on the readme, and a masked sprites tutorial explaining how to use xLIB to create masked sprites. We can hopefully create more documentation at some point in the future.
What would happen if there was a background already layed out on the screen, and you wanted to overlay a sprite on top of it? If you use any type of logic to draw the sprite, the background and sprite would get destroyed. Like this:
Do you notice the extra white space around Link, where the background should be? One technique programmers use to prevent this is called Masking. Here's one technique to do this.
Masking with AND
This is the most common technique that even assembly programmers use. What happens is the programmer creates 2 different sprites, one is the actual sprite, the other is a "mask". Here's how you create the mask.
First take a regular sprite like this:  
And fill in the background with black pixels, so it looks like this:  
Now just XOR the original sprite, so the filled background remains like this:  
The final result gives the mask of the sprite. Save this and the original sprite in a picture. 
Now when you display the sprite, you'd first ''AND'' the Mask to the screen (no update), and then ''XOR'' or ''OR'' the original sprite. The mask will force the pixels that take up the sprite's image off, clearing a space for the sprite, but not overwriting the background. For example:
PROGRAM:Mask
:real(0,0 \\ Clear the screen
:real(2,0,0,0,6,4,0,6,0,4,9,0,16,1 \\ Draws background tilemap stored in Pic9, notice 16*16 mode
:real(1,24,32,2,16,1,0,0,1,0,0 \\ Draws mask
:real(1,24,32,2,16,1,0,16,3,0,1 \\ Draw sprite
If you are considering using xLIB to produce amazing TIBasic programs, I trust that you are an experienced programmer and already know the basics of TIBasic programming. If you don’t, then this tutorial will still teach you, but it may not be as easy to understand.
xLIB is a graphical allaround application to enhance TIBasic programs with the power of assembly. Bundled in xLIB are many useful functions to allow you to use sprites, tilemaps, direct input, and many other features that you see in many assembly games from your TIBasic programs. It is similar to Detached Solution’s Omnicalc, and if you have experience with Omnicalc, you should have no problem with xLIB.
When you install xLIB, it will install a parser hook that will detect real() requests. All xLIB functions begin with real(, and when the command is executed, the function will be intercepted and carried out by xLIB.
The real( function can be accessed by pressing [MATH] and scrolling to the CPX menu.
Clearing the Screen
This is one of the simplest commands in xLIB. Just enter real(0,1 in your program to quickly clear the screen. You will almost never have to use ClrDraw after this, and, in addition, it also clears the home screen, too!
:real(0,[updateLCD]
updateLCD — This can either be 0 (don’t update the screen; useful for when you want to draw something on the screen with multiple commands and want for your picture to appear all at once) or 1 (update screen). If you want, you can drop this argument and have only real(0, and xLIB will automatically update the screen, and you’ll save two bytes, but there is a small possibility you could get an unexpected result, so do so at your own risk.
:real(0,1
Logic
A logic argument is often required in xLIB, here are the 4 possibilities:
 0 represents Overwrite, which means the sprite will overwrite whatever is existing in that location on the screen.
 1 represents AND logic. Please refer to the truth table first to try to understand it. Basically, for a pixel to be turned on in the final image, the background pixel must be black, and the sprite pixel must be back, making AND very useful for masking(more about that later)
 2 represents OR logic. Please refer to the truth table to find out more. In OR logic, the turned on pixels of the sprite will overlap whatever is on the screen,it's sorta useful when nothing is on the screen, but if there is already a background, it'll overlap it,and then you can't see anything.
 3 represents XOR logic. Please refer to the truth table to find out more. In XOR logic,if a pixel is already on in the background, and the sprite's pixel is on too, then it toggles it off.So basically,if pixels overlap,they get toggled on and off. This is an extremely useful feature as you can erase previous drawings of the same sprite on the screen by recalling the sprite again.
Truth Table
AND  OR  XOR  The 1s represent a Turned on Pixel  
1  1  1  1  0  The 0s represent a turned off pixel 
1  0  0  1  1  The 1st column represents the background 
0  1  0  1  1  The 2nd Column represents the Sprite 
0  0  0  0  0 
Sprites
We will first begin with one of the most useful tools xLIB has to offer: sprite commands. A sprite, in a few words, is an image that you can move around on the screen. If you have ever played a video game, the characters and elements such as people, weapon blasts, coins, bricks, etc. are sprites.
Before you can use the xLIB commands to draw sprites, you must create and store them. Sprites are stored and read from normal TIOS pictures. xLIB can recall sprites from pictures 1255, regardless if they're archived or not.
The Sprite Command
Let us look at xLIB's sprite function. It's used to place a single sprite on the screen.
:real(1,[X position],[Y position],[sprite width *],[sprite height],[sprite pic],[X offset *],[Y offset],[drawing logic],[horizontal flip],[update LCD]
Now, do not let the number of arguments of that command scare you into submission; it becomes very simple once you get the hang of it. Let's walk through it, shall we?
real(1 — Indicates you want the sprite command of xLIB.
X Position – The Xcoordinate of where you want the sprite to be displayed on the screen. This can range from 095, so you generally want the Xcoordinate to be displayed within that range, but xLIB supports clipped sprites, so in some cases you might want the xcoordinate to be larger or smaller than the screen's width.
Y Position — The Ycoordinate of where you want the sprite to be displayed on the screen. This can range from 063, but as with the Xcoordinate, you may want this to be larger or smaller than the screen's height.
Sprite Width – The width of your sprite, but this command might fool you at the beginning, because you must enter it in bytes. One byte is equal to 8 pixels, so if you have a sprite that is 1x1 to 8x8 pixels, then the sprite width would be one (1*8==8); a 9x9 to 16x16 pixel sprite would be two (2*8==16), and a 17x17 to 24x24 sprite would be three (3*8==24), and so on. Since you can't use pixel values, you may have some wasted space in the sprite picture, but sprites are generally kept widths as multiples of 8 for this reason. Sprite width can range from 0 to 12 bytes.
Sprite Height — Unlike the sprite width, this is the actual height in pixels of the sprite, so the height of an 8x8 sprite, for example, would be simply be 8. Don't get the values for sprite height and width confused, or you will get an unexpected result. Sprite height can range from 0 to 63 bytes.
Sprite Pic — This is the Pic# in which the sprite is located in. This ranges from 1 to 255. NOTE: xLIB considers 0 to be Pic 10, so entering zero here will actually read from Pic 10.
X Offset — This is the X offset where the sprite you want is located in the picture that the sprite is stored in. Like sprite width, this is the number of bytes from the left to where the sprite is located, so this might confuse you again in the beginning.
Y Offset — Is Y offset of the sprite you want, but is the number of pixels from the top to where the sprite is located.
To explain both X and Y offsets better in one paragraph, let's say you have an 8x8 pix sprite you want to use that is located 56 pixels from the left and 24 pixels from the top of the spritesheet picture. The X offset of that would be 7 bytes (because 7*8==56), and the Y offset would simply be 24 pixels.
Drawing Logic – This arguments tells xLIB how it should draw the sprite on the screen. There are four possibilities: 0 == overwrite, 1 == and, 2 == Or, 3 == xor. More information can be found in the Logic section.
Horizontal Flip — This argument is either a 1 or 0. If it is 1, then xLIB will draw your sprite horizontally. This is a big time and space saver, as you only would have to draw a character, say, that looks to the left, and use this to flip it when you want the character to look the other direction.
Update LCD – This argument is the same as it is for clear screen: 1 to update the screen; 0 to not update the screen. An Example:
PROGRAM:DispSprite \\Displays a sprite at location (24,34)
:real(1,24,34,1,8,10,0,0,3,0,1 \\from Pic0's top left sprite,uses xor logic,updates screen.
There are many ways to use the sprite command, even with masked sprites!
Tilemapping
One of the strongest features of xLIB is that it supports tilemapping through the request, real(2. First let me explain what tilemapping is. Let's say you have an RPG, and the main character enters a forest, the background of the forest, like all the trees and plants are all part of the tilemap. How do you do that though?
Well, you could store each individual background as a picture and then recall it as you come across it, but that takes up a lot of memory, and also, how would you do collision detection with the trees and plants? The solution programmers come up with is called a tilemap.
The tilemap is a matrix where each tile number corresponds with a particular sprite on a sprite sheet. Thus, you can do collision detection by checking what tile number it is in the tilemap. xLIB supports 8*8 tiles in a tilemap. Thus, a regular tilemap would have dimensions of 8*12. So if I have a tilemap like this
1,0,1,0,1,0,1,0,1,0,1,0
0,1,0,1,0,1,0,1,0,1,0,1
1,0,1,0,1,0,1,0,1,0,1,0
0,1,0,1,0,1,0,1,0,1,0,1
1,0,1,0,1,0,1,0,1,0,1,0
0,1,0,1,0,1,0,1,0,1,0,1
1,0,1,0,1,0,1,0,1,0,1,0
0,1,0,1,0,1,0,1,0,1,0,1
And I have a sprite sheet where tile number "0" corresponds with a blank space, and tile number "1" corresponds with a black square, then if I draw the tilemap to the screen, the screen would look like a checkerboard:
Now, let's look at the xLIB function :)
:real(2,Matrix_Name,X_Offset,Y_Offset,MapWidth,MapHeight,ScreenStartX,ScreenEndX,ScreenStartY,ScreenEndY,mPIC_Num,Tile_Method,Tile_Size,Map_UpdateLCD
Matrix name is a number from 09. Xlib uses the TIOS matrices for its tilemap. 0 represents matrix [A], 1[B],etc….9[J]
X_offset is a number that pinpoints the xcoordinate in the matrix at which xLIB starts reading the tilemap. This is used for scrolling, so for now, you might just want to leave it 0.
Y_offset is a number that pinpoints the ycoordinate in the matrix at which xLIB starts reading the tilemap. This is used for scrolling, so for now, you might just want to leave it at 0.
MapWidth is a number that is the width of the map you want to display. Normally, you'd want to leave the MapWidth at 12, seeing that 12 is the width of the screen.There are a few exceptions, though.
MapHeight is a number that is the height of the map. Normally, you'd want to leave the MapHeight at 8, because 8 is the height of the screen in bytes. There are a few exceptions, though.
ScreenStartX is a number from 012 which pinpoints the column on the screen in which you want to start drawing the tilemap. This is used for a "windowed" tilemap. Note that when you're in 16*16 tilemap mode,the values are 06 (*16)
ScreenEndX is a number from 012 which pinpoints the column on the screen in which you want to end the tilemap. This is used for a "windowed" tilemap. Note that when you're in 16*16 tilemap mode,the values are 06 (*16)
ScreenStartY is a number from 08 which pinpoints the row in which you want to start drawing the tilemap on the screen. This is used for a "windowed" tilemap. Note that when you're in 16*16 tilemap mode,the values are 04 (*16)
ScreenEndY is a number from 08 which pinpoints the row in which you want to stop drawing the tilemap on the screen. This is used for a "windowed" tilemap. Note that when you're in 16*16 tilemap mode, the values are 04 (*16)
NOTE: The above 4 arguments are all in bytes.
mPic_Num is the PicNumber in which the tiles for the tilemap are located. Now in the Pic, the top left 8*8 sprite is tile0 (NOT tile1). Then the sprite at right of it (at 8,0) is tile1, the one right of that one (at 16,0) is tile2. Thus, in the picture, the first row of sprites are tiles 011, then the second row is tiles 1223 and so on.
Now, an excellent feature of xLIB is that it can read picture data that is archived, and it supports multiple picture data! What does that mean? An ordinary picture has 12*8, 96 tiles. What if that isn't enough? Well, xlib can support unlimited tiles (actually 65536 tiles) so the picture after mPic_Num contains the next tiles 96191.
TileMethod is basically the same as the "logic" argument of the sprite function. 0 = Overwrite, 1 = AND, 2 = OR, 3 = XOR
TileSize is an interesting argument. A "0" (or basically omit the argument) represents a tilesize of 8*8, the regular mode. If the number is "16" instead, it represents you want the normal tile size to be 16*16. This will change several of the other arguments in the tilemap function. What's the use of this? Well first of all, some games will have 16*16 tiles, so instead of forming 4 8*8 tiles in a matrix, you can have just one 16*16 tile. This allows for smaller matrix sizes and saves a lot of space.
Map_UpdateLCD is the same as all the other UpdateLCD's. "0" represents no, "1" represents yes, the current screen data will be updated.
PROGRAM:TileMap
:[[1,0,1,0,1,0,1,0,1,0,1,0] //Store the tiledata to [A]
[0,1,0,1,0,1,0,1,0,1,0,1]
[1,0,1,0,1,0,1,0,1,0,1,0]
[0,1,0,1,0,1,0,1,0,1,0,1]
[1,0,1,0,1,0,1,0,1,0,1,0]
[0,1,0,1,0,1,0,1,0,1,0,1]
[1,0,1,0,1,0,1,0,1,0,1,0]
[0,1,0,1,0,1,0,1,0,1,0,1→[A]
:real(0,0
:real(2,0,0,0,12,8,0,12,0,8,1,0,8,1 //Draw the tiles to the screen, 12*8 tilemap
If you run this program and you have a black square as tile 0 in Pic1, then it will draw the following screen:
Recalling Pics
Recalling pics can be a very useful ability for a number of functions. The syntax is as follows:
:real(3,rPIC_Num,rPIC_Method,Recall_UpdateLCD
rPIC_Num is the picture you wish to recall.
rPIC_Method is the method you wish to use to recall, 0 for overwrite, 1 for AND (draws white for on pixels), 2 for OR (draws black for on pixels), or 3 for XOR (which inverts on pixels) like always.
Recall_UpdateLCD is the same as all the other UpdateLCD's. 0 represents no, 1 represents yes, the current screen data will be updated.
So, you may be wondering how this could be useful. One very obvious use is grayscale splash screens. If you have two pictures, lets say pic 0 and 1, you could switch between which is displayed within a loop, thus resulting in a gray effect where there is difference between the two pictures.
:Repeat A
:real(3,0,0,1
:getKey→A
:real(3,1,0,1
:End
In Assembly programming, they have use of a buffer, basically another extra screen to work with. In normal TIBasic, we don't have access to that, but we can essentially use pictures as buffers. One example of this is a background image to a game, you can save it in a separate picture, then recall it each time you want the background displayed.
Another code you can use uses the xor logic:
real(3,0,0,1
Repeat getkey
real(3,1,3,1
End
Screen Scrolling
Screen scrolling is a very basic function, although it is very handy in some situations.
:real(4,Scrl_Direction,Scrl_Number,Scrl_UpdateLCD
Scrl_Direction = The direction in which the screen scrolls.
Scrl_Number = The number of pixels the screen scrolls.
Scrl_UpdateLCD = Toggles a LCD update. 0 is no, 1 is yes.
The following numbers are what you put in place of Scrl_Direction, to tell the calculator which way you want your screen to move.
0  1  2  3  4  5  6  7 

Up  Down  Left  Right  UpLeft  UpRight  DownLeft  DownRight 
:real(4,3,5,1
The code above will scroll the screen right 5 pixels, then toggle a LCD update.
The Contrast
The contrast isn't all that hard to do inside TIOS, although if you want to set it to a certain level, or see what level you're on, this code is for you.
:real(5,Contrast_Function,ContrastVal
Contrast_Function = The action to take, shown below.
0 = Sets the contrast level.
1 = Get the contrast level.
ContrastVal = New contrast value. Can be a value from 039
If you're setting the contrast, then you need to input a number for ContrastVal.
If you're just getting the contrast, then you don't need to. When you do get the contrast, the level is stored in Ans.
If you were to merely get the contrast level, you would input the following:
:real(5,1
Then, you would simply type in Ans, and then it will show you the level of contrast. Otherwise, if you were to type in:
:real(5,0,26
Then that would set your contrast to level 26. Simple, I know.
xLIB Detection
If someone does not have xLIB installed, it may be difficult to alert them to this. To check for xLIB installation, the following code will work.
:1
:real(0
:If not(Ans:Then
:Disp "XLIB NOT ENABLED
:Stop
:End
In the case that xLIB is not installed, the message "XLIB NOT ENABLED" will be displayed and the program will quit. Otherwise, operation occurs normally.
Collision Detection
Collision detection is a necessity if you're going to make a graphic RPG, or any other game.
You can create collision detection many different ways. For instance; lists. If you wanted to use lists you would have to store all of the coordinates into a list, and then use if statements to check if the character is on that spot. Even though you can do collision detection with lists, I wouldn't reccomend it. The problem with using lists is that they aren't very memory efficient. That's why we are going to use the fPart( command.
The fPart( command grabs the decimal part of a variable. Which means we can add decimals in the Tilemap where the character isn't supposed to stand. Here's an example of the decimals in the Tilemap.
[[1,0,1.01,0,1,0]
[0,1,0,1,0,1]
[1,0,1,0,1,0]
[0,1,0,1,0,1] //Tilemap in matrix [A]
[1,0,1,0,1,0]
[0,1,0,1,0,1]
Here is the code example for detecting the decimal.
//character movement
If .01=fPart([A](X,Y:Then //(X,Y are the location of the character) if the decimal of X,Y in the tilemap equals .01/a border then
//don't let the character move
End
Using the fPart( command you can also do detection for special spaces. For example a door. The decimal .01 can stand for a place you can't walk into, and .02 can stand for a door.
If .02=fPart([A](X,Y:Then // If the decimal of X,Y in the tilemap equals .02/a door then
//enter the building or room
Using collision detection you can create much more than borders and doors. You can create many other spaces, such as coins, portals, water, etcetera.
Memory Functions
Get RAM value
:real(4
Reset RAM (Crash)
:real(34
xLIB is now an APP that adds some functionality to TI83+ BASIC programs. It installs a parser hook which will intercept any real( requests.
To install xLIB simply copy xLIB.8xk to your calculator using your favorite flavor of linking software.
To enable xLIB you must run it from the APPS menu and select "1". A message should appear informing you that xLIB has been enabled. Pressing "2" will disable xLIB and "3" will quit.
xLIB uses both SavesScreen and AppBackupScreen, if you have any other libs that use those saferam areas the results could be unpredictable.
0 ClearScreen
:real(0,Clr_UpDateLCD
Clr_UpdateLCD = Toggle LCD update: 0 = No, 1 = Yes
This function Clears the graph buffer and the LCD.
1 DrawSprite
:real(1,Spr_X,Spr_Y,Spr_Width,SprHeight,sPIC_Num,sPIC_X,sPIC_Y,Spr_Method,Spr_Flip,Spr_UpDateLCD
Spr_X  Sprite X location 
Spr_Y  Sprite Y location 
Spr_Width  Sprite width in bytes (so a 16 pixel wide sprite would have a width of 2) 
Spr_Height  Sprite height in pixels 
sPIC_Num  The picture in which the sprite is located PIC0  PIC9 
sPIC_X  X offset to sprite in PIC, must be ALIGNED. Can be a value from 011 
sPIC_Y  Y offset to sprite in PIC 
Spr_Method  The copy method 0 = Overwrite, 1 = AND, 2 = OR, 3 = XOR 
Spr_Flip = Flip Sprite 0  No Flip, 1 = Horizontal Flip 
Spr_UpdateLCD  Toggle LCD update 0 = No, 1 = Yes 
This function will draw clipped sprites of ANY size anywhere on the screen.
Don't forget that sprites always have a width which is a multiple of 8. However with this routine we want the byte width of the sprite. It is 8 pixels per byte! So a 8x8 sprite has a byte width of 1, a 16x16 sprite would have a byte width of 2. A 12x12 sprite would still occupy 2 byte so it also has a byte width of 2.
sPIC_X is only at ALIGNED positions, can be a value from 011
sPIC_Y can be from 063
Horizontal Sprite Flipping has now been implemented. This should save you some space.
This function will still be able to read PIC data even if it is archived!
2 DrawTileMap
:real(2,Matrice_Name,X_Offset,Y_Offset,MapWidth,MapHeight,ScreenStartX,ScreenEndX,ScreenStartY,ScreenEndY,mPIC_Num,Tile_Method,Tile_Size,Map_UpdateLCD
Matrice_Name  Name of matrice containing map data 0  9. 0 = [A]  9 = [J] 
X_Offsett  X Map Offsett. Which part of the map you wish to start drawing at 
Y_Offsett  Y Map Offsett. Which part of the map you wish to start drawing at 
MapWidth  Width of TileMap 
MapHeight  Height of TileMap 
ScreenStartX  Which COLUMN you wish to START drawing. Can be a value from 012 for 8x8 or 06 for 16x16 
ScreenEndX  Which COLUMN you wish to END drawing at. Can be a value from 012 for 8x8 or 06 for 16x16 
ScreenStartY  Which ROW you wish to START drawing. Can be a value from 08 for 8x8 or 04 for 16x16 
ScreenEndY  Which ROW you wish to END drawing at. Can be a value from 08 for 8x8 or 04 for 16x16 
mPIC_Num  The PIC in which the tile data is located PIC0  PIC255 
Tile_Method  The copy method 0 = Overwrite, 1 = AND, 2 = OR, 3 = XOR 
Tile_Size  Size of tiles, 8 = 8x8, 16 = 16x16 
Map_UpdateLCD  Toggle LCD update 0 = No, 1 = Yes 
The ScreenStartX, ScreenEndX, ScreenStartY, ScreenEndY enable you to draw a 'windowed' map. This means that you can draw your map and leave space for a HUD or something similar. Drawing smaller maps will also be a little faster.
To draw an 8x8 tilesize map centered with a 1 tile blank border the inputs would be:
ScreenStartX  1 
ScreenEndX  11 
ScreenStartY  1 
ScreenEndY  7 
The TileMap routine now supports MULTIPLE PICS and 16bit TILE INDEXES. This means that you can have a map with more than 256 different tiles. If a tile is >95 it will overlap to the next PIC (if it exists).
PICS must follow each other numerically!
So if your input PIC is PIC0 any tiles > 95 will be taken from PIC1 and any tiles > 191 will be taken from PIC2.
If the PIC doesn't exist then the tile will be drawn as a BLANK.
This function will still be able to read PIC data even if it is archived! But it may slow things down.
3 RecallPIC
:real(3,rPIC_Num,rPIC_Method,Recall_UpdateLCD
rPIC_Num  PIC to recall PIC0  PIC255 
rPIC_Method  The copy method 0 = Overwrite, 1 = AND, 2 = OR, 3 = XOR 
Recall_UpdateLCD  Toggle LCD update 0 = No, 1 = Yes 
This will recall a pic and display it with some options (OR, XOR etc)
This function will still be able to read PIC data even if it is archived!
4 ScrollScreen
:real(4,Scrl_Direction,Scrl_Number,Scrl_UpdateLCD
Scrl_Direction  direction to scroll 
Scrl_Number  number of pixels to scroll 
Scrl_UpdateLCD  Toggle LCD update 0 = No, 1 = Yes 
Directions
0  1  2  3  4  5  6  7 

Up  Down  Left  Right  UpLeft  UpRight  DownLeft  DownRight 
5  ChangeContrast
:real(5,Contrast_Function,ContrastVal
Contrast_Function  Contrast returned in Ans (039). 0 = Set Contrast, 1 = Get Contrast 
ContrastVal  New contrast value. Can be a value from 039 
6  UpdateLCD
:real(6
This function will copy the graph buffer to the LCD
7  RunIndicator
:real(7,runIndicVal
runIndicVal  Toggle Run Indicator. 0 = Off, 1 = On 
8  getKey
:real(8
Scans the keypad and returns a key code in the ANS variable.
Has support for multiple arrow keypresses.
Key Codes9  CreatePIC
:real(9,cPIC_Funtion,cPIC_Num
cPIC_Function  Function to perform. 0 = StorePIC, 1 = DeletePIC 
cPIC_Num  Number of PIC file to store to. Ranges from 1255 
NOTE: PIC0 is actually PIC10 according to the TIOS. To store to PIC0 use:
:real(9,10
IMPORTANT: Because the pics use tokens in their name that the TIOS doesn't really have (for PICS) the names in your memory management will be all strange. For example:
PIC0 inString( P/Y ZTest( 
This is perfectly normal, nothing is wrong with your calculator. The TIOS just doesn't have the names for PIC variables above the 10th.
To transfer these pics to your calculator, you must group them. Sending may fail if you attempt to send them individually.
10  ExecuteArchivedProg
:"PRGMNAME:real(10,exAction,Prgm_Dest:prgmXTEMP0XX
"PRGMNAME  Name of program to be stored in the Ans variable. Program can be archived or in RAM 
exAction  Action to perform. 0 = copy, 1 = clean specific, 2 = clean all 
Prgm_Dest  Destination XTEMP program. Ranges from 015 
This function will copy a program from the archive or RAM to one of 16 XTEMP programs. The name of the
program to copy must be stored in the Ans variable prior to running this function.
This function will work with TIBasic and TIOS ASM (nostub) programs.
For example, to copy the TIBasic program ADEMO to XTEMP000 you would do:
:"ADEMO
:real(10,0,0
To copy the TIBasic program MAP1 to XTEMP011, and then RUN XTEMP011 you would do:
:"MAP1
:real(10,0,11
:prgmXTEMP011
To copy the TIOS ASM program SCROLL to XTEMP009, and then RUN XTEMP009 you would do:
:"SCROLL
:real(10,0,11
:Asm(prgmXTEMP011
To remove program XTEMP006 you would do:
:real(10,1,6
To remove all XTEMP0XX programs you would do:
:real(10,2,0
NOTE: If the XTEMP0XX program already exists (in RAM or archive), then this function will exit without copying. You must manually remove the target program before attempting to replace it. (This is to stop accidents with nested programs trying to replace themselves).
11  GetCalcVersion
:real(11
Returns a code in the ANS variable which will tell you what calculator version you are running.
0  1  2  3 

83+  83+SE  84+  84+SE 
12  DrawShape
:real(12,Shape_Type,x1,y1,x2,y2,DrawShape_UpdateLCD
Shape_Type  Type of Shape you want to draw: 
Number  

0  DrawSingleLineBlack 
1  DrawSingleLineWhite 
2  DrawSingleLineInvert 
3  DrawEmptyRectangleBlack 
4  DrawEmptyRectangleWhite 
5  DrawEmptyRectangleInvert 
6  DrawFilledRectangleBlack 
7  DrawFilledRectangleWhite 
8  DrawFilledRectangleInvert 
9  DrawRectOutlineBlackFillWhite 
10  DrawRectOutlineWhiteFillBlack 
Position  
x1  First x coord (for rectangles this is TOP LEFT corner) 
y1  First y coord (for rectangles this is TOP LEFT corner) 
x2  Second x coord (for rectangles this is BOTTOM RIGHT corner) 
y2  Second y coord (for rectangles this is BOTTOM RIGHT corner) 
DrawShape_UpdateLCD  Toggle LCD update 0 = No, 1 = Yes 
13  TextMode
:real(13,Text_Mode
Text_Mode  Change the text mode: 0 = Normal, 1 = Inverse, 2 = Lowercase on, 3 = Lowercase off 
When Lowercase is enabled, press ALPHA twice to enter lowercase mode in the TIOS.
NOTE: Some TIOS functions (like errors and some menus) automatically reset these text flags to Normal.
14  CheckRAM
:real(14
Returns the amount of FREE RAM in ANS
WARNING: You MUST provide the correct inputs for each function. If you do not, you risk a crash or worse.
Do NOT try to run your TIBasic from MirageOS! I use a saferam area that MirageOS uses, so it may cause instability.
Credits & Thanks
Dan Weiss (DWedit): APP Devkit 2.0
Dan Englender (Dan_E): WikiTI
Sean McLaughlin (Sigma): Ideas for masked/clipped sprite routine without smc
Patai Gergely (CoBB): PindurTI, greatest 83+ emulator by far
Badja: Initial Clipped line routine
James Montelongo (Jim e) & YUKI: DI wrapper routine ideas
Texas Instruments (TI): SDK and System Routine Documentation
Kevin Ouellet (Kevin, xlibman): Testing & ideas
George DaoleWellman (Dysfunction): Testing & ideas
Kalan Scallan (kalan_vod): Testing & ideas
Fred Sparks (CDI, [froody]): Testing & ideas
threefingeredguy: Testing & ideas
Shaun McFall (Merthsoft): Testing & ideas
Fred Shen (dragon_lance): Testing & ideas
Brian Benson (Necro): Testing & ideas
Everyone on MaxCoderz Forums
Everyone in #TCPA (EfNet)
If I forgot you, please email me and I will update this section.
Disclaimer
This program is still in early stages and may contain bugs. Program is use at own risk, I can not be held responsible for loss of data and or hardware damage.
If you have any questions please email me at <ua.moc.oohayae1p1rt#ua.moc.oohayae1p1rt>
I have no problem with anyone using this program as long as you credit me properly. Please don't try to modify and/or pass this program off as your own with out first gaining my consent.
tr1p1ea — 04/02/2006 (DD/MM/YYYY)
Returns true if value1 is less than or equal to value2.
value1≤value2
Press:
 2nd TEST to access the test menu.
 6 to select ≤, or use arrows.
TI83/84/+/SE
1 byte
The ≤ (less than equal) operator takes two numbers, variables, or expressions, and tests to see if the first one has a value less than or equal to the second one. It will return 1 if it is less than or equal to, and 0 if it is not. When determining the order of operations, ≤ will be executed after the math operators, but it will be executed before the logical operators and in the order that it appears from left to right with the other relational operators.
:1≤0
0
:DelVar X3→Y
:X≤Y
1
Advanced Uses
Just like the other relational operators, ≤ can take real numbers and lists for variables. In order to compare the lists, however, both must have the same dimensions; if they don't, the calculator will throw a ERR:DIM MISMATCH error. When comparing a real number to a list, the calculator will actually compare the number against each element in the list and return a list of 1s and 0s accordingly.
:{2,4,6,8}≤{1,3,5,7
{0 0 0 0}
:5≤{1,2,3,4,5
{0 0 0 0 1}
Unfortunately, ≤ does not work with strings, matrices, or complex numbers (only = and ≠ do), and the calculator will actually throw a ERR:DATA TYPE error if you try to compare them. In the case of strings, however, it should be pretty obvious why: a string represents a sequence of characters, and does not associate a value to any character, so there is nothing to compare.
Error Conditions
 ERR:DATA TYPE is thrown if you try to compare strings, matrices, or complex numbers.
 ERR:DIM MISMATCH is thrown if you try to compare two lists that have different dimensions.
Related Commands
Returns true if value1 is less than value2.
value1<value2
Press:
 2nd TEST to access the test menu.
 5 to select <, or use arrows.
TI83/84/+/SE
1 byte
The < (less than) operator takes two numbers, variables, or expressions, and tests to see if the first one has a value less than the second one. It will return 1 if it is less than, and 0 if it is not. When determining the order of operations, < will be executed after the math operators, but it will be executed before the logical operators and in the order that it appears from left to right with the other relational operators.
:1<0
0
:DelVar X3→Y
:X<Y
1
Advanced Uses
Just like the other relational operators, < can take real numbers and lists for variables. In order to compare the lists, however, both must have the same dimensions; if they don't, the calculator will throw a ERR:DIM MISMATCH error. When comparing a real number to a list, the calculator will actually compare the number against each element in the list and return a list of 1s and 0s accordingly.
:{2,4,6,8}<{1,3,5,7
{0 0 0 0}
:5<{1,2,3,4,5
{0 0 0 0 0}
Unfortunately, < does not work with strings, matrices, or complex numbers (only = and ≠ do), and the calculator will actually throw a ERR:DATA TYPE error if you try to compare them. In the case of strings, however, it should be pretty obvious why: a string represents a sequence of characters, and does not associate a value to any character, so there is nothing to compare.
Error Conditions
 ERR:DATA TYPE is thrown if you try to compare strings, matrices, or complex numbers.
 ERR:DIM MISMATCH is thrown if you try to compare two lists that have different dimensions.
Related Commands
Returns true if value1 is greater than or equal to value2.
value1≥value2
Press:
 2nd TEST to access the test menu.
 4 to select ≥, or use arrows.
TI83/84/+/SE
1 byte
The ≥ (greater than equal) operator takes two numbers, variables, or expressions, and tests to see if the first one has a value greater than or equal to the second one. It will return 1 if it is greater than or equal to, and 0 if it is not. When determining the order of operations, ≥ will be executed after the math operators, but it will be executed before the logical operators and in the order that it appears from left to right with the other relational operators.
:1≥0
1
:DelVar X3→Y
:X≥Y
0
Advanced Uses
Just like the other relational operators, ≥ can take real numbers and lists for variables. In order to compare the lists, however, both must have the same dimensions; if they don't, the calculator will throw a ERR:DIM MISMATCH error. When comparing a real number to a list, the calculator will actually compare the number against each element in the list and return a list of 1s and 0s accordingly.
:{2,4,6,8}≥{1,3,5,7
{1 1 1 1}
:5≥{1,2,3,4,5
{1 1 1 1 1}
Unfortunately, ≥ does not work with strings, matrices, or complex numbers (only = and ≠ do), and the calculator will actually throw a ERR:DATA TYPE error if you try to compare them. In the case of strings, however, it should be pretty obvious why: a string represents a sequence of characters, and does not associate a value to any character, so there is nothing to compare.
Error Conditions
 ERR:DATA TYPE is thrown if you try to compare strings, matrices, or complex numbers.
 ERR:DIM MISMATCH is thrown if you try to compare two lists that have different dimensions.
Related Commands
Returns true if value1 is greater than value2.
value1>value2
Press:
 2nd TEST to access the test menu.
 3 to select >, or use arrows.
TI83/84/+/SE
1 byte
The > (greater than) operator takes two numbers, variables, or expressions, and tests to see if the first one has a value greater than the second one. It will return 1 if it is greater, and 0 if it is not. When determining the order of operations, > will be executed after the math operators, but it will be executed before the logical operators and in the order that it appears from left to right with the other relational operators.
:1>0
1
:DelVar X3→Y
:X>Y
0
Advanced Uses
Just like the other relational operators, > can take real numbers and lists for variables. In order to compare the lists, however, both must have the same dimensions; if they don't, the calculator will throw a ERR:DIM MISMATCH error. When comparing a real number to a list, the calculator will actually compare the number against each element in the list and return a list of 1s and 0s accordingly.
:{2,4,6,8}>{1,3,5,7
{1 1 1 1}
:5>{1,2,3,4,5
{1 1 1 1 0}
Unfortunately, > does not work with strings, matrices, or complex numbers (only = and ≠ do), and the calculator will actually throw a ERR:DATA TYPE error if you try to compare them. In the case of strings, however, it should be pretty obvious why: a string represents a sequence of characters, and does not associate a value to any character, so there is nothing to compare.
Error Conditions
 ERR:DATA TYPE is thrown if you try to compare strings, matrices, or complex numbers.
 ERR:DIM MISMATCH is thrown if you try to compare two lists that have different dimensions.
Related Commands
Returns true if value1 is not equal to value2.
value1≠value2
Press:
 2nd TEST to access the test menu.
 2 to select ≠, or use arrows.
TI83/84/+/SE
1 byte
The ≠ (not equal) operator takes two numbers, variables, or expressions, and tests to see if they are not equal to each other. It will return 1 if they are not, and 0 if they are. When determining the order of operations, ≠ will be executed after the math operators, but it will be executed before the logical operators and in the order that it appears from left to right with the other relational operators.
1≠0
1
0→X
0
3→Y
3
X≠Y
1
Advanced Uses
Just like the other relational operators, ≠ can take real numbers and lists for variables. In order to compare the lists, however, both must have the same dimensions; if they don't, the calculator will throw a ERR:DIM MISMATCH error. When comparing a real number to a list, the calculator will actually compare the number against each element in the list and return a list of 1s and 0s accordingly.
:{2,4,6,8}≠{1,3,5,7
{1 1 1 1}
:5≠{1,2,3,4,5
{1 1 1 1 0}
Besides real numbers and lists, ≠ also allows you compare strings, matrices, and complex numbers. However, the variables must be of the same type, otherwise the calculator will throw a ERR:DATA TYPE error; and just like with lists, both matrices must have the same dimensions, otherwise you will get a ERR:DIM MISMATCH error.
:[[1,2,3]]≠[[1,2,3
0
:"HELLO"≠"WORLD
1
:(3+4i)≠(52i) (the parentheses are added for clarity)
1
Optimization
Don't compare a variable's value to zero in a conditional expression, because the calculator treats nonzero values as true and zero as false. Instead, just write the variable by itself:
:If C≠0
can be
:If C
Error Conditions
 ERR:DATA TYPE is thrown if you try to compare two different kinds of variables, such as a string and number or a list and matrix.
 ERR:DIM MISMATCH is thrown if you try to compare two lists or matrices that have different dimensions.
Related Commands
Returns true if value1 is equal to value2.
value1=value2
Press:
 2nd TEST to access the test menu.
 1 to select =, or use arrows.
TI83/84/+/SE
1 byte
The = (equal) operator takes two numbers, variables, or expressions, and tests to see if they are equal to each other. It will return 1 if they are, and 0 if they are not. When determining the order of operations, = will be executed after the math operators, but it will be executed before the logical operators and in the order that it appears from left to right with the other relational operators.
1=0
0
0>X
0
3→Y
3
X=Y
0
Advanced Uses
Just like the other relational operators, = can take real numbers and lists for variables. In order to compare the lists, however, both must have the same dimensions; if they don't, the calculator will throw a ERR:DIM MISMATCH error. When comparing a real number to a list, the calculator will actually compare the number against each element in the list and return a list of 1s and 0s accordingly.
{2,4,6,8}={1,3,5,7
{0 0 0 0}
5={1,2,3,4,5
{0 0 0 0 1}
Besides real numbers and lists, = also allows you compare strings, matrices, and complex numbers. However, the variables must be of the same type, otherwise the calculator will throw a ERR:DATA TYPE error.
[[1,2,3]]=[[1,2,3
1
"HELLO"="WORLD
0
(3+4i)=(52i)
0
When matrices are compared, the result is 1 if the matrices are identical. Both matrices must have the same dimensions, otherwise you will get a ERR:DIM MISMATCH error. Internally, the calculator compares values from the bottom right of each matrix, moving left across each row from bottom to top. If unequal elements are found, the calculator returns 0 without examining the rest of the matrix.
Optimization
When a variable is used in a conditional statement, and the only values that are possible for a variable are 1 and 0, you can get rid of the = sign and simply use the variable by itself.
:If X=1
can be
:If X
Error Conditions
 ERR:DATA TYPE is thrown if you try to compare two different kinds of variables, such as a string and number or a list and matrix.
 ERR:DIM MISMATCH is thrown if you try to compare two lists or matrices that have different dimensions.
Related Commands
The ‾ (negative) operator takes one number, variable, or expression and negates its value, thus returning the negative equivalent of it. The ‾ operator appears higher in the order of operations than both the relational and logical operators, so it will be executed first. In addition, it has the same order of operation as the other math operators, so the calculator simply executes them left to right in the order that they appear.
:‾1
1
:5→X
:‾3(X+2
21
:‾2→A:‾3→B
:AB
6
Optimization
When adding a negative number to a positive number, switch the two numbers around and change the addition to subtraction. This allows you to get rid of the ‾ sign and save a byte.
:‾A+B→C
can be
:BA→C
This is not always the case, however: if you subtract a command that uses a lot of parentheses and is followed by a newline/colon/STO→ arrow, it'd save space to put the subtraction at the beginning of the line. For instance:
:inString(Ans,sub(Str1,1,1+int(log(A))))1
can be
:‾1+inString(Ans,sub(Str1,1,1+int(log(A
Error Conditions
If an ERR:SYNTAX is being thrown near a subtraction or negation where there should be no errors, check to make sure that ‾ (negation) and  (subtraction) were not swapped by mistake.
Related Commands
The → (store) command will store a number, variable, or expression to a variable, using the respective value(s) of the variable(s) at the time. When storing a value in a variable, you have the value on the left side of → and the variable that it will be stored to on the right side.
:1→X
1
:{1.3,5.7,9.11→ABC
{1.3 5.7 9.11}
:"HELLO WORLD→Str1
"HELLO WORLD"
Advanced
It's not easy to put a → symbol into a string, since "→→Str1 would produce a syntax error (and in general, when the calculator 'sees' a → symbol, it assumes that the string is over, and interprets the symbol literally).
However, you can use Equ►String( (outside a program) to get the → or " symbols in a string:
 Type them on the home screen and press [ENTER]
 Select 1:Quit when the ERR:SYNTAX comes up.
 Press [Y=] to go to the equation editor.
 Press [2nd] [ENTRY] to recall the symbols to Y_{1}
 Now, use Equ►String(Y_{1},Str1) to store the symbols to a string.
Optimization
You can remove closing parentheses, braces, brackets, and quotes that are before a → command.
:"Hello"→Str1
can be
:"Hello→Str1
Related Commands
Zooms to a smaller graphing window with the same centre.
Zoom In
Press:
 ZOOM to access the zoom menu.
 2 to select Zoom In, or use arrows and ENTER.
TI83/84/+/SE
1 byte
Outside a program, the Zoom In tool allows you to pick a point on the graph screen and change the graphing window to a smaller one centered at that point. The Zoom In command, used in a program, also changes the graphing window to a smaller one, but doesn't let you pick a point — it uses the center of the screen.
The variables XFact and YFact are used to determine how much the graphing window changes: the total width of the screen, XmaxXmin, is divided by XFact, and the total height, YmaxYmin, is divided by YFact. Because you can't store a value less than 1 to either of these variables, the screen is guaranteed to get no larger.
Aside from Xmin, Xmax, Ymin, and Ymax, no window variables are modified by this command (although ΔX and ΔY change as they are defined).
Error Conditions
 ERR:INVALID occurs if this command is used outside a program.
 ERR:WINDOW RANGE is thrown if the window is zoomed in beyond the level of the calculator's precision.
Related Commands
The / (divide) operator takes two numbers, variables, or expressions and divides them, thus returning a single new value. The / operator appears higher in the order of operations than both + and , so if those appear in an expression, / will be executed first. In addition, the * operator has the same order of operations as /, so the calculator simply executes them left to right in the order that they appear.
:1/1
1
:5→X
:2/3X
3.333333333
:2→A:3→B
:A/B/B/A
.1111111111
Related Commands
Error Conditions
 ERR:DATA TYPE is thrown if you divide by a matrix.
 ERR:DIVIDE BY 0 is thrown if you divide by 0 or a undefined variable.
The * (multiply) operator takes two numbers, variables, or expressions and multiplies their values together, thus returning a single new value. The * operator appears higher in the order of operations than both + and , so if those appear in an expression, * will be executed first. In addition, the / operator has the same order of operations as *, so the calculator simply executes them left to right in the order that they appear.
:1*1
1
:5→X
:2*3X
30
:2→A:3→B
:A/B*B/A
1
Advanced Uses
As it turns out, the most advanced way to use * is by not using it at all. On z80based TI calculators, two adjacent expressions or variables are implicilty multiplied even without a * mark.
:5*A
should be
:5A
:5*cos(N*θ
should be
:5cos(Nθ
There are a few cases in which omitting the multiplication sign doesn't work. For example, 2^4*E3 (which evaluates to 16000) can't be replaced by 2^4E3, since the latter is interpreted as 2^(4000).
Optimization
The * sign has the same truth value as the and operator because they both return zero if one or more of the numbers is zero (based on Boolean logic). Consequently, you sometimes see people implicitly multiplying expressions together in conditionals and loops, instead of joining them together with and. Unfortunately, this is not only usually larger in size, but often times slower.
:If (A=2)(B=7
should be
:If A=2 and B=7
It does save some space when you can avoid using parentheses:
:If A and B
could be
:If AB
Timing
The amount of time taken to multiply two real floatingpoint numbers varies with the sum of the digits (including in the fractional part) of the right argument. On a 15 MHz calculator, a single multiplication in the worst case (when the right argument is 99999999999999) takes 3.3 ms, the best case (when the right argument is 0) takes about 0.1 ms, and the average case (for fourteendigit floating point numbers) takes about 1.7 ms.
These timings do not include parser overhead or variable recall time, which are often significant in overall program speed.
Related Commands
The  (subtract) operator takes two numbers, variables, or expressions and subtracts one from the other, thus returning the difference between them. The  operator appears lower in the order of operations than both * and /, so if those appear in an expression, they will be executed first. In addition, the + operator has the same order of operations as , so the calculator simply executes them left to right in the order that they appear.
:11
0
:5→X
:23X
13
:2→A:3→B
:A/BB/A
.8333333333
Error Conditions
 ERR:SYNTAX is thrown if you try to use  (subtract) in place of ‾ (negative). Because they look very similar, it's easy to get this error; at the same time, it's an easy error to fix.
Related Commands
Returns the sum of two numbers, or joins two strings together.
value1 + value2
string1 + string2
Press [+]
TI83/84/+/SE
1 byte
The + (add) operator takes two numbers, variables, or expressions and adds their values together, thus returning a single new value. The + operator appears lower in the order of operations than both * and /, so if those appear in an expression, they will be executed first. In addition, the  operator has the same order of operations as +, so the calculator simply executes them left to right in the order that they appear.
:1+1
2
:5→X
:2+3X
17
:2→A:3→B
:A/B+B/A
2.166666667
Advanced Uses
The + operator is overloaded (meaning it has more than one function) by the calculator, and it can be used to put strings together. The strings can consist of whatever combination of text and characters that you want, but it unfortunately does not allow you to join a string to a number (i.e., "Hello5" cannot be made with "Hello"+5).
:"HELLO"+"WORLD
"HELLOWORLD
:"TI"+""+"BASIC
"TIBASIC
Related Commands
The π constant on the calculator approximates the mathematical constant π (pi), defined as the ratio of a circle's circumference to its diameter. It's fairly important in many areas of mathematics, but especially trigonometry. Probably the most common use of π on the TI83 series calculators is for dealing with angles in radian form.
The approximate value of π stored on the calculator is 3.1415926535898.
Related Commands
 e
 ^{r}
Restores window settings to the default.
ZStandard
Press:
 ZOOM to access the zoom menu.
 6 to select ZStandard, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The ZStandard command resets all window variables found in the Window screen to their default values. This means that, unlike the other zoom commands, ZStandard can affect variables other than Xmin, Xmax, Ymin, and Ymax. However, it will only affect variables that have a purpose in the current graphing mode. Here are the default values set by ZStandard:
In all modes:
 Xmin=10
 Xmax=10
 Xscl=1
 Ymin=10
 Ymax=10
 Yscl=1
Only in Func mode:
 Xres=1
Only in Param mode:
 Tmin=0
 Tmax=2π (in Radian mode) or 360 (in Degree mode)
 Tstep=π/24 (in Radian mode) or 7.5 (in Degree mode)
Only in Polar mode:
 θmin=0
 θmax=2π (in Radian mode) or 360 (in Degree mode)
 θstep=π/24 (in Radian mode) or 7.5 (in Degree mode)
Only in Seq mode:
 nMin=1
 nMax=10
 PlotStart=1
 PlotStep=1
These settings are often useful as a "lowest common denominator" that will work fairly well for all graphs.
Advanced Uses
ZStandard is often used before commands such as ZSquare or ZInteger in programs. This serves two purposes: it makes sure that the center of the screen for ZSquare and ZInteger is (0,0), and it ensures that the graph screen is cleared without having to resort to ClrDraw (because with two different zooms in a row, the window settings have to change at least once, which means the graph will have to be regraphed)
Error Conditions
 ERR:INVALID occurs if this command is used outside a program.
Related Commands
The Zoom commands are found in the menu you get by pressing ZOOM. They are used to manipulate the window variables to change the bounds of the graphing window. With the exception of ZStandard, ZoomSto, and ZoomRcl, these commands only affect the variables universal to all graphing modes: Xmin, Xmax, Xscl, Ymin, Ymax, and Yscl. They ignore the variables specific to a single graphing mode:
 Xres (only used in Func mode)
 Tmin, Tmax, and Tstep (only used in Param mode)
 θmin, θmax, and θstep (only used in Polar mode)
 nMin, nMax, PlotStart, and PlotStep (only used in Seq mode)
Zoom Variables
Virtually every window variable has a zequivalent (ZXmin for Xmin, ZPlotStart for PlotStart, etc.) that are found under VARS2:Zoom… — these are used by ZoomSto and ZoomRcl. Also, the variables XFact and YFact (found under VARS1:Window…) are used by Zoom In and Zoom Out.
Commands
The commands themselves are only available in programs. Outside it, you can only choose the equivalent menu option (which doesn't leave an entry on the homescreen, and sometimes slightly differs in effect) — this happens, even if you choose the command from the catalog. Of course, with a bit of trickery, you can get the command token itself on the homescreen, but then ERR:INVALID will be thrown if you try to use it. The Trace command also works this way.
The following zoom commands are available:
Compresses an assembly program in hexadecimal form into binary form.
Asm(prgmORIGINAL,prgmRESULT)
This command is only found in the catalog. Press:
 2nd CATALOG to access the command catalog.
 Scroll down to AsmComp( and press enter.
TI83+/84+/SE/CSE/CE
(not available on the regular TI83)
2 bytes
This command is used to compress an assembly program written using AsmPrgm into an "assembled" assembly program. This will make the program about twice as small, and protect it from being edited, in addition to making execution faster.
To use AsmComp(, give it the ASCII represented assembly program, followed by the name you want the assembled program to have. That name can't be already taken. Since it's not easy to rename an assembled assembly program, if you want to write a program called prgmGAME, you type the ASCII represented code in a program with a different name (e.g. GAMEA) and then do AsmComp((prgmGAMEA,prgmGAME).
Assembly programs can be run with Asm(.
Error Conditions
 ERR:DUPLICATE is thrown if prgmRESULT is an already used program name;
 ERR:INVALID is thrown if prgmORIGINAL doesn't start with AsmPrgm;
 ERR:SYNTAX is thrown if prgmORIGINAL is not an assembly program.
Related Commands
This command must be the beginning of an assembly program.
AsmPrgm
This command is only found in the catalog. Press:
 2nd CATALOG to access the command catalog.
 Scroll down to AsmPrgm and press ENTER.
TI83+/84+/SE/CSE/CE
(not available on the regular TI83)
2 bytes
This command denotes the start of an assembly program in hexadecimal form. The command must go at the beginning of a program.
Using AsmPrgm is the only builtin way to create assembly programs on the calculator, and it's not very convenient. To use it, after AsmPrgm itself, you must type in the hexadecimal values (using the numbers 09, and the letters AF) of every byte of the assembly program. Even for assembly programmers, this is a complicated process: unless you've memorized the hexadecimal value of every assembly command (which is about as easy as memorizing the hexadecimal value of every TIBasic token) you have to look every command up in a table.
In addition, it's easy to make a typo while doing this. For this reason, it's recommended not to use AsmPrgm to write assembly programs on the calculator, but instead write assembly programs on the computer. This also lets you use emulators and debuggers and such, as opposed to crashing your calculator (possibly permanently) every time you have a bug.
Just about the only use for AsmPrgm is to enter the hex codes for simple assembly routines that can be called from Basic programs or used for some other short task. For example, the following program will allow you to type in lowercase letters (by pressing ALPHA twice, you go into lowercase letter mode):
AsmPrgmFDCB24DEC9
To use this, create a program, and enter the code above into it. Then run the program using Asm(. Voila! Lowercase letters are now enabled.
More such short programs can be found here.
TI84+ Color Calculators
For the TI84+ C series of calculators, AsmPrgm has been replaced by two new commands: AsmPrgm84C for the TI84+ CSE and AsmPrgmCE for the TI84+ CE. The commands function in the exact same manner as the original AsmPrgm command. However, it is important to note that sending assembly programs between a CSE and CE (or vice versa) may cause errors due to a difference in commands.
Many of the hex codes involving AsmPrgm also no longer function correctly on C series calculators. The updated hex codes can be found here. Please note, however, that directly entering hex codes has been disabled on the CE with OS 5.3.1; attempting to view AsmPrgmCE in the catalog will show the command crossedout. Hex codes can be still be run from older programs.
Related Commands
See Also
Runs an assembly program.
Asm(prgmNAME)
This command is only found in the catalog. Press:
 2nd CATALOG to access the command catalog.
 DOWN six times.
 ENTER to select Asm(.
TI83+/84+/SE
(not available on the regular TI83)
2 bytes
The Asm( command is used for running an assembly program. Unlike TIBasic programs, assembly programs are written in the calculator's machine code directly, which makes them more powerful in both speed and functionality. However, it also means that if they crash, they crash hard — there is no builtin error menu to protect you.
Keep in mind that many assembly programs these days are written for a shell such as Ion or MirageOS. If you're dealing with one of those programs, calling Asm( on it will do nothing; you need to get the appropriate shell and run that instead.
With the AsmPrgm and AsmComp( commands, you can create small assembly programs yourself, directly on the calculator. If you are using at TI84+CE with OS 5.3, the Asm( is unnecessary to run such programs.
Error Conditions
 ERR:INVALID is thrown if the program isn't an assembly program.
Related Commands
See Also
Short for dividing by 100.
value%
This command can only be accessed through a hex editor (its hex code is 0xBB 0xDA)
TI83/84+/SE, OS v1.15+
2 bytes
The % symbol is an undocumented command on the TI83 series calculators starting with OS version 1.15. It's useful as a shortcut for percents  it divides by 100, so it will convert numbers to percentages. For example, 50% will become 50/100 or 1/2, which is just what 50% should be.
Although this trick can save you a few bytes, it also makes your program incompatible with old OS versions — it's up to you to decide if the tradeoff is worth it.
The % symbol is not quite equivalent to the value 0.01: typing in % by itself will give you a syntax error, as expected.
Entering the % symbol
There are several assembly programs out there that can let you access the % symbol if you know what you're doing, but here is a short, selfcontained way. First, create an assembly program by entering the following into the program editor:
:AsmPrgmEFF1423605C9
:BBDA
Then compile it: for example, if you entered the above into prgmX, and prgmY is free, then you can run
AsmComp(prgmX,prgmY
Then run the compiled assembly program:
Asm(prgmY
Now the compiled assembly program will become unlocked and contain the characters:
:??ˣ√B6BoxPlotsinh⁻¹(%
Most of this is garbage data and can be deleted, and the final character is the % character we wanted. (If you delete the other characters, then the % symbol can be accessed at any time by pressing [2nd][RCL] and choosing prgmY.)
Error Conditions
 ERR:INVALID is thrown on older operating system versions.
Related Commands
The number of the equation or plot being traced is displayed in the top right corner.
ExprOff
Press:
 2nd FORMAT to access the graph format menu
 Use arrows and ENTER to select ExprOff
TI83/84/+/SE
2 bytes
The ExprOff command enables a "short" form of displaying the equation or plot being traced. That is, only the number of the equation or plot will be displayed, in the top right corner of the screen. When tracing a plot, the number will be prefixed with a P to distinguish it from an equation.
Related Commands
The equation or plot being traced is displayed in long form at the top of the screen.
ExprOn
Press:
 2nd FORMAT to access the graph format menu
 Use arrows and ENTER to select ExprOn
TI83/84/+/SE
2 bytes
The ExprOn command enables a "long" form of displaying the equation or plot being traced.
In this mode, when tracing an equation, the equation's name and its formula are written in small font at the top of the screen. For example, when tracing Y_{1} which is equal to 2X, "Y1=2X" will be displayed.
When tracing a plot, the plot number is written, followed by the list or lists that it describes. For example, when tracing Plot1, which is a scatter plot of ∟X and ∟Y, "P1:X,Y" will be displayed.
Related Commands
Turns on the cursor coordinate display on the graph screen.
CoordOn
Press:
 2nd FORMAT to access the graph format menu
 Use arrows and ENTER to select CoordOn
TI83/84/+/SE
2 bytes
When moving a cursor on a screen, it's possible for the calculator to display the coordinates of the current point (either polar or rectangular coordinates, depending on which of RectGC or PolarGC is set). The CoordOn command turns on this option (to disable it, use the CoordOff command).
The coordinates are displayed in practically every situation when you're moving a cursor on the graph screen, even including the Trace, Input or Select( commands in a program. The interactive mode of Text( and the Pen tool are the exceptions — this is because these two situations involve a pixel coordinate, and not a point.
Related Commands
Turns off the cursor coordinate display on the graph screen.
CoordOff
Press:
 2nd FORMAT to access the graph format menu
 Use arrows and ENTER to select CoordOff
TI83/84/+/SE
2 bytes
When moving a cursor on a screen, it's possible for the calculator to display the coordinates of the current point (either polar or rectangular coordinates, depending on which of RectGC or PolarGC is set). The CoordOff command turns off this option.
To turn it on, use the CoordOn command.
Related Commands
Sets the calculator to display point coordinates using polar coordinates.
PolarGC
Press:
 2nd FORMAT to access the graph format screen
 Use arrows and ENTER to select PolarGC.
TI83/84/+/SE
2 bytes
The PolarGC ("Polar Grid Coordinates") command (like its opposite, the RectGC) command, affects how the coordinates of a point on the graph screen are displayed. When PolarGC is enabled, the coordinates of a point are displayed as (R,θ).
The polar coordinates of a point can be interpreted as the distance R it is away from the origin (0,0), and the direction θ. θ is the angle that a ray to the point would make with the positive Xaxis (so polar coordinates are affected by Degree/Radian mode). An angle of 0 means the point is to the left of the origin; an angle of 90° (π/2 radians) means it's up from the origin, and so on. So, for example, the point with R=2 and θ=270° (3π/2 radians) would be two units down from the origin.
Of course, coordinates are only displayed with the CoordOn setting; however, with CoordOff, RectGC and PolarGC are still useful, because in a variety of cases, the coordinates of a point are also stored to variables. PolarGC doesn't change the fact that they're stored to X and Y, as with RectGC; however, with PolarGC, they are also stored to R and θ.
Although the PolarGC command naturally goes with Polar graphing mode, the two settings are independent; you can use both PolarGC and RectGC with any graphing mode.
Advanced
The following situations involve storing coordinates of a point to variables:
 Graphing an equation
 Tracing an equation or plot
 Moving the cursor on the graph screen
 Using the interactive mode of one of the 2nd DRAW commands
 Using one of DrawF, DrawInv, or Tangent(
 Anything in the 2nd CALC menu.
Naturally, any command like Input or Select( which involves the above, will also store coordinates of a point.
Related Commands
Sets the calculator to display point coordinates using rectangular (Cartesian) coordinates.
RectGC
Press:
 2nd FORMAT to access the graph format screen
 Use arrows and ENTER to select RectGC.
TI83/84/+/SE
2 bytes
The RectGC ("Rectangular Grid Coordinates") command (like its opposite, the PolarGC) command, affects how the coordinates of a point on the graph screen are displayed. When RectGC is enabled, the coordinates of a point are displayed as (X,Y).
The X and Y coordinates of a point are interpreted as the horizontal and vertical distance from the origin (the point (0,0)) Up and right are positive directions, while down and left are negative. For example, the point (1,2) — that is, the point with xcoordinate 1 and ycoordinate 2 — is one horizontal unit right and two horizontal units down from (0,0).
Of course, coordinates are only displayed with the CoordOn setting; however, with CoordOff, RectGC and PolarGC are still useful, because in a variety of cases, the coordinates of a point are also stored to variables. With RectGC enabled, they are stored to X and Y.
Advanced
The following situations involve storing coordinates of a point to variables:
 Graphing an equation
 Tracing an equation or plot
 Moving the cursor on the graph screen
 Using the interactive mode of one of the 2nd DRAW commands
 Using one of DrawF, DrawInv, or Tangent(
 Anything in the 2nd CALC menu.
Naturally, any command like Input or Select( which involves the above, will also store coordinates of a point.
Related Commands
Enables the grid on the graph screen.
GridOn
Press:
 2nd FORMAT to access the graph format menu.
 Use arrows and ENTER to select GridOn.
TI83/84/+/SE
2 bytes
The GridOn command enables a grid on the graph screen (you can disable it again with the GridOff command). How fine or coarse the grid is depends on the Xscl and Yscl variables. Drawing the grid just involves plotting points all the points of the form (A*Xscl, B*Yscl) that are in the graphing window. The grid is often used in games such as Dots & Boxes, TicTacToe, and 2D puzzles.
On the TI84+CSE and TI84+CE, an additional argument may be used to set the color of the grid:
:GridOn GRAY
Like other drawing commands, the color may be replaced by its numerical value (ranging from 10 to 24).
Advanced Uses
GridOn can be used to shade the entire screen if Xscl and Yscl are small enough that the points on the grid are one pixel apart:
:ΔX→Xscl
:ΔY→Yscl
:GridOn
This is one of the shortest ways to shade the screen, although Shade( can be used for a (usually) even shorter way. However, using GridOn is also very slow: the fastest way involves the Horizontal or the Vertical commands in a For( loop (or the BackgroundOn command for color calculators).
Related Commands
Disables the grid on the graph screen.
GridOff
Press:
 2nd FORMAT to access the graph format menu.
 Use arrows and ENTER to select GridOff.
TI83/84/+/SE
2 bytes
The GridOff command disables the grid on the graph screen. This is the default setting. Use GridOn to enable the grid.
Related Commands
Note: The Piecewise Expressions page more clearly spells out the concepts discussed within this page, so please link to that page instead.
Boolean logic is the way that the calculator expresses logical statements. A statement can have either one of two values, true or false, and can be as simple or complex as you want. For example, if we were evaluating a proposition from a sentence, such as "It is cold in Minnesota…", this proposition can only be true or false at any one time — in this case, it is definitely true :D
While we humans are able to think about a proposition and evaluate its truthhood rationally, the calculator has its own builtin system based strictly on math for determining whether a logic statement is true or false. In addition, the calculator uses a value of zero (0) to signify false, and one (1) or any other nonzero number (including negative, decimal, and even complex) to signify true.
The primary places where you will see Boolean logic used are in conditionals and loops, although its application and impact can be felt almost everywhere. A typical conditional in TIBasic looks something like this:
:If A=5
:B+4→B
When the calculator evaluates the A=5 statement, it will get back either a value of zero or one. If it gets a one, that means the A variable had a value of five at the time, and it will subsequently go ahead and execute the statement immediately following on the next line (i.e., B+4→B). However, the next statement will be completely skipped over if a zero is returned.
Although the statement in the previous example is already pretty simple, you can in fact go even simpler, and just use 1 or 0 as the statement. Because both of them are absolutes, meaning their value never changes, the statement will essentially be executed or completely skipped over each time indefinitely — there is no need to do any evaluating because there is nothing to evaluate.
In terms of practical use, you could use a While 1 loop as the main program loop that encompasses the entire program. Because a While loop has no builtin capability to break out of the loop, it would not end until you manually exited it (by pressing the ON key).
:While 1
:Disp "Hello World
:End
Similarly, you can use a While 0 loop (or If 0 conditional) for making comments in your programs, as well as creating a special kind of subprogram which exists entirely inside a program. Both of these applications are somewhat advanced, but they nonetheless still rely on Boolean logic to work.
Boolean Conditionals
The most useful, and common, application of Boolean logic is what is known as Boolean conditionals. Boolean conditionals work best when just manipulating one variable, and the way they work is by putting the condition statement inside parentheses, and then placing it right next to the value that you are manipulating the variable by. For example, here is what the original conditional would look like:
:B+4(A=5→B
Because the calculator uses math for determining the value of a statement, it will first evaluate the statement inside the parentheses (which is our A=5 statement), and return 1 or 0, respectively. The calculator then multiplies that value by the value you are adding to the variable (in this case, 4), and stores the result to the variable. A helpful way to look at it is by replacing the statement with the literal 1 and 0 numbers:
:B+4(1)→B
As you can see, the calculator will multiply 4 times 1, and then store that to B (so B will now have a value that is increased by four). If you replace the 1 with 0, the calculator will still multiply and store a value to B, but it will instead turn out to be 0 (because anything multiplied by zero equals zero; it's a basic law of algebra), so the B variable will still have its original value.
Of course, your Boolean conditionals don't have to be that simple — you can have multiple conditions with almost any combination of commands, functions, and operators, and the calculator will evaluate them like it would anything else. One of the most common Boolean conditionals that you will see involves using the arrow keys to move a character around the screen:
:getKey→K
:Y(Ans=25)+(Ans=34→Y
:X(K=24)+(K=26→X
In this particular example, there are two conditionals used because you can move in the Y direction (which is represented by the first conditional and uses the up and down arrow keys) and the X direction (which is represented by the second conditional and uses the left and right arrow keys), so you need to keep track of two separate variables, and likewise update each variable independently of the other.
See Also
Enables automatic calculations in the table.
DependAuto
Press:
 2nd TBLSET to access the table settings menu.
 Use arrows and ENTER to select Auto from the Depend: line.
TI83/84/+/SE
1 byte
When the DependAuto setting (opposed to the DependAsk setting) is turned on, values in the table are automatically calculated. With IndpntAuto, that means the table is automatically filled out completely; with IndpntAsk, that means that as soon as you enter a value for the independent variable, all the values of the dependent variables are calculated. This is usually the setting you want to use.
Related Commands
Disables automatic calculations in the table.
DependAsk
Press:
 2nd TBLSET to access the table settings menu.
 Use arrows and ENTER to select Ask from the Depend: line.
TI83/84/+/SE
1 byte
When the DependAsk setting (opposed to the DependAuto setting) is turned on, values in the table are not automatically calculated. To calculate the value of an equation, you have to select the column corresponding to that equation in the row corresponding to the value at which to calculate it, and press ENTER. For example, to calculate Y1 at X=0, select the X=0 column, scroll right to Y1, and press ENTER.
The DependAsk setting might be useful when dealing with a difficulttocalculate function, for which you wouldn't want to have to calculate values that aren't really necessary.
Related Commands
Doesn't automatically fill in table values for the independent variable.
IndpntAsk
Press:
 2nd TBLSET to access the table settings menu.
 Use arrows and ENTER to select Ask in the Indpnt: line.
TI83/84/+/SE
1 byte
With the IndpntAsk setting, the independent variable (X, T, θ, or n depending on graphing mode) will not be calculated automatically in the table. Instead, when looking at the table, you must select an entry in the independent variable column, press ENTER, and enter a value. The values entered will also be stored to the TblInput list.
(To access the table, press [2ND][TABLE], or use the DispTable command in a program)
The alternative, IndpntAuto, fills in several values starting at TblStart and increasing by ΔTbl, and makes the table scrollable (up and down).
Related Commands
Automatically fills in the table values for the independent variable.
IndpntAuto
Press:
 2nd TBLSET to access the table settings.
 Use arrows to select Auto in the Indpnt line to select IndpntAuto.
TI83/84/+/SE
1 byte
The IndpntAuto setting sets the independent variable (X, T, θ, or n depending on graphing mode) to be filled in automatically in the table (which is accessible by pressing 2nd TABLE, or from a program with the DispTable command).
The values which will be filled in start at the value TblStart and increment by ΔTbl(which can be negative, but not 0). They will also be stored in the list TblInput. All these variables can be accessed through the VARS6:Table… menu; TblStart and ΔTbl can also be edited in the [2ND][TBLSET] menu.
The other possibility for this setting is IndpntAsk  if that setting is turned on, you must scroll to the corresponding row in the independent variable column, and enter a value.
Error Conditions
 ERR:DOMAIN is thrown if ΔTbl=0.
Related Commands
Displays the graph screen.
DispGraph
While editing a program, press:
 PRGM to access the program menu.
 RIGHT to access the I/O submenu.
 4 to select DispGraph, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The DispGraph command displays the graph screen, along with everything drawn or graphed on it.
In many cases, this doesn't need to be done explicitly: commands from the 2nd DRAW menu, as well as many other graph screen commands, will display the graph screen automatically when they are used. Mainly, it's used for displaying the graphs of equations or plots in a program — you would define the variable in question, then use DispGraph to graph it. For example:
:"sin(X)"→Y1
:DispGraph
Advanced Uses
DispGraph can also be used to update the graph screen, even if it's already being displayed. For example, changing the value of a plot or equation variable doesn't update the graph immediately. Consider this program:
:0→I
:"Isin(X)"→Y1
:DispGraph
:For(I,1,10)
:End
At first, it graphs the equation Y=Isin(X) with I=0. After this, I is cycled from 1 to 10. However, though the parameter I changes, the graph screen isn't updated, and only the initial graph of Y=0sin(X) and final graph of Y=10sin(X) are displayed. If, on the other hand, we change the program:
:0→I
:"Isin(X)"→Y1
:DispGraph
:For(I,1,10)
:DispGraph
:End
Now the DispGraph inside the loop ensures that the graph screen is updated every time, and the program will correctly display all eleven graphs.
Error Conditions
 ERR:INVALID occurs if this statement is used outside a program.
Related Commands
Clears the history of commands previously entered on the homescreen.
Clear Entries
Press:
 2nd MEM to access the memory menu.
 3 to select Clear Entries, or use arrows and ENTER.
TI83/84/+/SE
2 bytes
Normally, by pressing 2nd ENTER repeatedly, you can cycle through some of the recent entries on the home screen. With the Clear Entries command, this history is cleared (only Clear Entries remains in the history).
This can be used to free some memory, although it's recommended not to do this in a program (because clearing things without asking first isn't nice). Aside from that, maybe the only reason to use Clear Entries is to protect your privacy — although someone looking at your entries will know you cleared something, so it's not that effective.
Related Commands
Clears up 'garbage' that comes from unarchiving or deleting archived files.
GarbageCollect
This command can only be found in the catalog. Press:
 2nd CATALOG to access the command catalog
 G to skip to commands starting with G
 ENTER to select GarbageCollect
TI83+/84+/SE
(not available on the regular TI83)
2 bytes
A bit of a preamble: unlike RAM, which is the easytoaccess memory, Flash ROM (the archive), used for longterm storage on the 83+ and higher, can't be written to easily. Skipping over technicalities, what's written in the archive once is semipermanent, and can't be written to again unless an entire 64KB sector of memory is erased.
As a result, when you delete a variable from archive, the calculator doesn't delete it immediately (there may be other, good variables in the same block that would get erased as well), it just marks it as deleted. Similarly, when you unarchive a variable, its data is copied to RAM and the original is marked as deleted.
Naturally, this can't be done forever: sooner or later you'll run out of space in the archive because all of it is taken up by these "garbage variables". At this point, the calculator does something known as "garbage collecting". It copies the actuallyused variables in each sector to a backup sector (set aside just for this purpose), then erases it; the process is repeated for the other sectors. Additionally, the variables are rearranged so that they aren't spread out all over the place; this makes it more likely that a spot will be found for large variables.
While "garbage collecting" will be done automatically when it's absolutely necessary, this may be a timeconsuming process at that stage. Instead, you can call the GarbageCollect command yourself periodically (how often depends on your calculator habits, but generally once a month or so could work) to keep the Flash ROM in a semineat state, and then it will be a fairly quick process.
During garbage collection, a menu will appear that asks you "Garbage Collect?", giving you the options No and Yes. If you didn't select the GarbageCollect command yourself, it's highly recommended to select Yes. If you did select it, you probably want to garbage collect, so you should also select Yes. At that point, the message "Garbage collecting…" will be displayed for some time, and then the process will end.
Advanced Uses
To avoid garbage collecting often, reduce the amount of times you archive and unarchive variables. There's also the consideration that too many writes to the Flash ROM (which are directly related to the number of GarbageCollects you do) can, in theory, wear it out. This probably would take much longer than anyone's used a TI83+ calculator so far, though, and in all probability you don't really have to worry about this.
Related Commands
Disables labels on the X and Y coordinate axes.
LabelOff
Press:
 2nd FORMAT to access the format menu.
 Use arrows and ENTER to select LabelOff.
TI83/84/+/SE
2 bytes
The LabelOff setting disables labels on the X and Y coordinate axes. This is unnecessary if you've disabled the axes themselves, since the labels are only displayed when the axes are. To enable the labels, use the reverse setting LabelOn.
Related Commands
Puts labels on the X and Y coordinate axes.
LabelOn
Press:
 2nd FORMAT to access the format menu.
 Use arrows and ENTER to select LabelOn.
TI83/84/+/SE
2 bytes
The LabelOn setting enables labels on the X and Y coordinate axes. If both LabelOnand AxesOn are set, the axes will be displayed with an X next to the X (horizontal) axis, and a Y next to the Y (vertical) axis. To disable these labels, use the LabelOff setting.
LabelOn and LabelOff have no effect if the coordinate axes aren't displayed; there's nothing to label.
A somewhat quirky behavior of the X and Y labels is that they aren't saved by StorePic. If you save a picture of the graph screen, it records every detail of the way it looks, including equations, drawn elements, axes, grid, everything — but not the labels.
One final comment: okay, so by the way the command works we know it was once intended to label the axes. However, the command doesn't actually check where the axes are. It puts an "x" slightly above the bottom right corner, and a "y" slightly below the top left. Most of the time, including the default graphing window, that doesn't help you to distinguish the axes in the slightest. And in splitscreen mode, as shown in the screenshot, they both seem to label the xaxis. Weird.
Related Commands
:ClrDraw
:31→A:47→B
:randInt(1,4→C
:Repeat getKey
:C1+2pxlTest(A,B
:Ans+4((Ans<1)(Ans>4→C
:PxlChange(A,B
:B+(Ans=2)(Ans=4→B
:A+(C=3)(C=1→A
:End
Langton's ant is a simulation of the movement of an ant, with some simple rules governing it: the ant can move in any of the four cardinal directions, but whenever it goes over one of the previous spots that it was at, it will change direction 90°. Although the ant movement appears chaotic, given enough time it actually ends up being a pattern.
In our routine, the ant is going to be a simple pixel. Before we can display the ant on the screen, however, we need to clear it and initialize its starting position. (47,31) was chosen because it is the exact center of the screen, which should provide the ant with ample room to move around.
We then randomly select a starting direction for the ant to go — 1 for down, 2 for right, 3 for up, and 4 for left. Once we have a direction selected, we display the ant and it will start moving around. The ant will keep moving around indefinitely until you press a key, although you could limit it to a set number of moves by replacing the Repeat loop with a For( loop.
Draws the inverse of a curve in terms of X.
DrawInv curve
Press:
 2nd DRAW to access the draw menu.
 8 to select DrawInv, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The DrawInv command draws the inverse of a curve in terms of X. Its single argument is an expression in terms of X.
For example, DrawInv X² will draw the inverse of the equation Y=X^{2}. The inverse reverses the variables X and Y, so that the curve X=Y^{2} will be graphed. In this case, the inverse of the function has a simple form: Y=√(X) and Y=√(X); most functions, however, do not have an inverse expressible as Y= equation, making this command particularly useful.
You can also think of this as graphing the expression but with X representing the vertical direction, and Y representing the horizontal.
DrawInv requires the calculator to be in Func mode, and is affected by the Connected/Dot setting.
Advanced Uses
DrawInv will update X and Y for each coordinate drawn (like Tangent( and DrawF), and exit with the last coordinate still stored.
When evaluating the expression using DrawInv, the calculator will ignore the following errors: ERR:DATA TYPE, ERR:DIVIDE BY 0, ERR:DOMAIN, ERR:INCREMENT, ERR:NONREAL ANS, ERR:OVERFLOW, and ERR:SINGULAR MAT. If one of these errors occurs, the data point will be omitted.
For this reason, DrawInv can sometimes behave in an unexpected fashion: for example, it doesn't throw an error for list or matrix expressions (it won't graph anything, either).
Error Conditions
Related Commands
Enables the X and Y axes on the graph screen.
AxesOn
Press:
 2nd FORMAT to access the format menu.
 Use arrows and ENTER to select AxesOn.
TI83/84/+/SE
2 bytes
The AxesOn command enables the X and Y axes on the graph screen, so that they are drawn. They can be disabled with the AxesOff command.
(the y=x line that is drawn when both Seq and Web modes are enabled is also controlled by this command)
Related Commands
Disables the X and Y axes on the graph screen.
AxesOff
Press:
 2nd FORMAT to access the format menu.
 Use arrows and ENTER to select AxesOff.
TI83/84/+/SE
2 bytes
The AxesOff command disables the X and Y axes on the graph screen, so that they aren't drawn. They can be enabled again with the AxesOn command.
(the y=x line that is drawn when both Seq and Web modes are enabled is also controlled by this command)
Generally, the AxesOff command should be used at the beginning of the program to disable the axes if the program is going to use the graph screen, since the axes get in the way. However, you should consider using StoreGDB and RecallGDB to save this setting if that's the case.
Related Commands
Turns off equations in the Y= editor (all of them, or only the ones specified)
FnOff [integer] [,integer]
Press:
 VARS to access the variables menu.
 RIGHT to access the YVARS submenu.
 4 to select On/Off…, or use arrows and ENTER.
 2 to select FnOff, or use arrows and enter.
TI83/84/+/SE
1 byte
The FnOff command is used to turn off equations in the current graphing mode. When you turn off an equation, it's still defined, but isn't graphed; you can reverse this with the FnOn command. To turn functions on and off manually, put your cursor over the = symbol in the equation editor, and press enter.
When FnOff is used by itself, it will turn off all defined equations in the current graphing mode. You can also specify which equations to turn off, by writing their numbers after FnOff: for example, FnOff 1 will turn off the first equation, and FnOff 2,3,4,5 will off turn the second, third, fourth, and fifth. The numbers you give FnOff have to be valid equation numbers in the graphing mode. When turning equations on and off in sequence mode, use 1 for u, 2 for v, and 3 for w.
The most common use for FnOn and FnOff is to disable functions when running a program, so that they won't interfere with what you're doing on the graph screen, then enable them again when you're done.
Error Conditions
 ERR:DOMAIN is thrown if an equation number isn't valid in the current graphing mode, or at all.
Related Commands
Turns on equations in the Y= editor (all of them, or only the ones specified)
FnOn numbers//
Press:
 VARS to access the variables menu.
 RIGHT to access the YVARS submenu.
 4 to select On/Off…, or use arrows and ENTER.
 ENTER to select FnOn.
TI83/84/+/SE
1 byte
The FnOn command is used to turn on equations in the current graphing mode. When you define an equation, it's turned on by default, but the FnOff command can turn an equation off (in which case, it's still defined, but isn't graphed). To turn functions on and off manually, put your cursor over the = symbol in the equation editor, and press enter.
When FnOn is used by itself, it will turn on all defined equations in the current graphing mode. You can also specify which equations to turn on, by writing their numbers after FnOn: for example, FnOn 1 will turn off the first equation, and FnOn 2,3,4,5 will turn the second, third, fourth, and fifth. The numbers you give FnOn have to be valid equation numbers in the graphing mode. When turning equations on and off in sequence mode, use 1 for u, 2 for v, and 3 for w.
The most common use for FnOn and FnOff is to disable functions when running a program, so that they won't interfere with what you're doing on the graph screen, then enable them again when you're done.
Error Conditions
 ERR:DOMAIN is thrown if an equation number isn't valid in the current graphing mode, or at all.
Related Commands
When contributing a tip or trick, please follow these guidelines:
 A tip/trick about using a variable should only be included if it is undocumented or not wellknown.
 A tip/trick should have some practical application as part of a program, and not just be something trivial.
 A tip/trick about making a program more efficient generally belongs on the optimization page.
 A tip/trick should be thoroughly explained and tested to make sure others can use it correctly.
General Tips
Checking for Whole Number
The fastest way to check for a whole number is:
:not(fPart(X
Using DelVar
When using the DelVar command, you don't need to use colons (:) between the DelVars:
:Delvar ADelvar Str1...
This also holds when you are dealing with a completely different command, so
:DelVar AClrHome
is perfectly legal.
Know When to Use Variables
Many times you will have to use a number repeatedly in a program. To save memory you can assign that number to a variable at the beginning of your program and then just call that variable whenever you need it. This also works for strings that are used a lot.
Why Variables Get Messed Up
There are several things that can cause variables to get messed up:
 The Equation Solver updates any given letter variable that is solved for.
 Function graphing, and the tracing thereof, causes X and Y to be updated.
 Parametric graphing, and the tracing thereof, causes X, Y, and T to be updated.
 Polar graphing, and the tracing thereof, causes X, Y, R, and θ to be updated.
 Sequence graphing, and the tracing thereof, causes X, Y, and n to be updated.
 Generally, moving the cursor on the graph screen updates X and Y.
 All the above update R and θ as well if in PolarGC mode.
 Tangent, DrawF, and DrawInv update X and Y for each coordinate drawn.
 All Shade( functions update X and Y for each coordinate drawn.
 Y is set to zero per each refresh of the graph screen. (The only reason I can think of is that Y is involved in the calculating of the regions.)
 Generating a list through sequencing does not update letter variables (but will create them if they didn't exist)
Extra Variables
Sometimes when doing a program you might run out of variables to use. If that happens there are many different places you can go to for more variables. Some are:
 Create lists or matrices and just use/manipulate them
 Extra N—Open the catalog and press LOG and ENTER
 Window variables—Hit VARS and then ENTER
 Statistic variables—Hit VARS, 5, and scroll through the menus of variables
 Finance variables—Hit APPS and then go into the Finance application
(Note: You can also use most of them as characters.)
List Tips
Use Custom Lists before BuiltIn Lists
Avoid using lists other than _{L}1, _{L}2,…, _{L}6. You should only use custom lists when you need to save something.
Check if Elements are the Same
The quickest way to check if all the elements of L1 are the same is max(Δlist(L1.
Separate a List
You can use seq(L_{1}(A),A,C,D→L2 to separate a list into two or more lists, where C is the start and D is the stop.
Favor cumSum(binomcdf( over seq(
cumSum(binomcdf(X,0 is the same as seq(I,I,1,X and is smaller and faster. See here for more information.
Angle Values in List
If you use the tangent, sine, or cosine function in programs you might notice they aren’t that fast. A better way to do it is to store the values in a list and then recall them from the list.
Store to one List Element Higher than Exists
You can store to one list element higher than exists. This even applies if the list does not exist, in which case the list would be created and the first element would be where the value is stored.
:3→dim(L1
:Input A
:A→L1(4
(Note: This will create a fourth element in list 1, and then store A in the fourth element.)
Create a List without the _{L} in Front
When you store to a custom list, usually you need the little “L” in front. However, this is not true. If you just have a letter or a number that is being stored to, it will actually store the list data to a list with the letter or number’s name.
:{1,2→LA
can be
:{1,2→A
Shuffle a List
The smallest and (almost) fastest way to shuffle a list (for instance, a deck of cards) is:
:seq(X,X,1,52→L1
:rand(52→L2
:SortA(L2,L1
This technique can, of course, be extended to lists of other lengths.
Chop Off First Element of a List
You can chop off the first element of a list by using the ∆List( and cumSum( commands together, since they are essentially exact opposites. In this example, the first element of L1 is chopped off and the list is stored back to L1:
:∆List(cumSum(L1→L1
UserFriendly Lists
I'm sure others like me want to be able to type in a list without the brackets, separating the elements with only commas. Here's how:
:Input Str1
:expr("{"+Str1→L1
Load a UserNamed List
This will load any list the user names:
:Repeat 5≥length(Str1
:Input "Name of List:",Str1
:End
:expr("L"+Str1→L1
Matrix Tips
Initializing Matrices
In games where you store maps with all the same values in matrices, you need to initialize the matrices in order to use them. There are three different ways that you can do this.
The first way is to set the dimensions of a matrix and then use the Fill( command:
:{8,8→dim([A]
:Fill(0,[A]
The second way you can initialize the matrix is to actually delete it before using it, and then set its dimensions to the desired row and width. This initialization method only works when you want all the matrix elements to have a value of zero.
:DelVar [A]{8,8→dim([A]
The last way you can initialize the matrix is to use the identity( command. The identity( command is used to create an identity matrix based on the matrix that it's given, which must be a square, nbyn matrix. Because of the identity( command, this initialization method only works when you have a square matrix and you want all the matrix elements to have a value of zero.
:0identity(8→[A]
String Tips
Skip String►Equ( Command
If you want to put a string into one of the function variables (Y0Y9) you don’t need to use the String►Equ( command. Instead, you can just simply store the string into the function variable.
:String►Equ(Str1,Y1
can be
:Str1→Y1
Get → and " in a String
Follow these steps to get the → or " symbols in a string:
 Type them on the home screen and press [ENTER]
 Select 2:Quit when the ERR:SYNTAX comes up.
 Press [Y=] to go to the equation editor.
 Press [2nd] [ENTRY] to recall the symbols to Y_{1}
 Now, use Equ►String(Y_{1},Str1) to store the symbols to a string.
Use the expr( Command
One of the most unknown and unused commands is expr(. What this command does is allow you to store an expression to a string (includes graph equations) and then execute the string. Since you may use graph equations, you have 28 "extra" strings to use for text and data storage. But if you use graph equations to store data in a graphicsbased program, remember to turn the functions off with FnOff.
:Input “Formula:”,Str1
:Disp expr(Str1
Converting a String to List
The fastest way to convert a string that contains only alphanumeric characters and spaces to a list is:
:seq(inString("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",sub(Str1,A,1)),A,1,length(Str1→L1
Copy & Paste Function
If you store frequently used code to a string, you can recall the string into a program as a sort of "copyandpaste" function. However you have to go through menus to get to the string, not to mention delete the quotes. So store your three most frequently used pieces of string into those variables, u, v, and w. Recalling these don't generate quotes, and it's faster than getting it from a string within the menus. See selfmodifying code for more information.
Ans Tips
If you want to speed up your program while doing calculations, you can use the Ans variable. To use Ans, put the calculation in a line all by itself, then it will automatically be stored into Ans saving the need for storing the calculation into a variable. (NOTE: You should only use Ans if it involves changing just one variable.)
:If 8>C
:Output(4,2,"Higher
:If 8<C
:Output(4,2,"Lower
can be
:"Higher
:If 8<C
:"Lower
:Output(4,2,Ans
Whenever you are using the pxlTest( command and speed is a priority, you should put the command on its own line and test for Ans:
:pxlTest(0,0
:If Ans
is faster than
:If pxlTest(0,0
When you are using a For( loop, you can use the following if you want to store something in A without messing up Ans:
:For(A,16,0,1
:End
Productivity is all about using your TI calculator as efficiently and effectively as possible. There are several things you can do to improve your productivity when you are writing TIBasic programs:
 Keyboard Shortcuts — In the Program editor, if you press alpha followed by up or down, you will scroll a whole page of program code. In addition, 2nd right will take you to the end of your current line, and 2nd left will take you to the beginning of that line.
 Backup Often — You never know when your calculator might crash, and you would be extremely upset if you lost all of your new work on your program that you had been working on. If you only have one program, backing up just consists of creating a new program, and recalling the program code into that program. However, if your program uses several programs and other variables, you should group it instead.
 Archive Programs — When you are not using a program, you should archive it so that it won't get erased accidentally in case of a RAM clear. This also applies to important program data, such as a highscore list. Alternatively, you can also group the program and program data together so you have both in one file. Grouping also saves more RAM than archiving the programs separately.
 Know The Commands — There are lots of commands on the calculator that people never bother using, mainly because they don't know about them. Before trying to create your own program to do something, check to see if the calculator doesn't already provide a command or function that does it, because the builtin commands are almost always faster and smaller.
 Edit On The Computer — The TIGraph Link program that TI provides allows you to edit programs on the computer. In addition to faster scrolling and making program structure easier to visualize, the Graph Link also features the ability to type lowercase text and lock a program so it can't be edited on the calculator.
 Use CtlgHelp — CtlgHelp is an Assembly application that is rather large (it is 32KB), but is a very helpful reference when trying to remember the syntax for using a command. After you have installed it, you just have to go to the Catalog menu and press the + key to see the help for that command. It can also be used in other menus, such as the MATH, LIST, and PRGM menus.
 Write Comments — Whenever you write a complicated piece of code, you should put a comment in the code explaining what it does, and if appropriate, how it does it. If you ever need to come back to the code, you will now be able to quickly ascertain everything you need to know about the code. Comments are also useful when you don't have the time to implement something, and you want to remind yourself with a quick "To Do".
 Reuse Code — In many large programs, there are several pieces of code that get reused multiple times. Rather than writing the code over and over again, you can simply store it in its own program and have the main program call it as a subprogram. Because the subprogram is insignificant by itself, you should start its name with a Z or theta so that it appears at the bottom of the program list.
 Coding Style — When writing a program, you should follow code conventions so that it is easy to read and understand. Although each programmer has their own preferences in regards to programming code, there are some general guidelines that most people follow, which help to provide continuity across the programming community:
 Line up corresponding commands and statements vertically.
 Don't go through silly contortions to use a loop, when Goto/Lbl branching would be more practical.
 Use mnemonic label names. For example, Lbl UP would be an appropriate choice for code that moves the screen up.
 Before using custom list variables, you should use up the builtin variables.
 If you have a really complex expression, you should add some parentheses to make it easier to read.
 Be consistent throughout all your code. If you do one thing in one program, you should do it the same way in another program.
Converts temperature to Fahrenheit, Celsius, or Kelvin.
A  the starting temperature value
None
A, B, C
TI83/84/+/SE
Weregoose
URL: United TI
:Input A:0
:Menu(" Convert From ","F",0,"C",1,"K",2
:Lbl 2:Ans+1
:Lbl 1:Ans+1
:Lbl 0:Ans→B
:For(C,0,2
:A273.15(2B>C+2
:If Bnot(C
:1.8Ans+32
:If Cnot(B
:5/9(Ans32
:Disp sub("FCK",C+1,1),Ans+273.15(B+2<2C
:End
With the temperature value stored in A, we ask the user to select which temperature format they want to convert it to — Fahrenheit, Celsius, or Kelvin — and then initialize the B variable to the appropriate value that matches up with the format associated with it (K is 2, C is 1, and F is 0).
We then use a For( loop to display what the respective temperature value would be in the other temperature formats, based on the respective temperature conversion formulas:
Fahrenheit  Celsius  Kelvin  

Fahrenheit  (9C/5)+32  9(K273.15)/5+32  
Celsius  5(F32)/9  K273.15  
Kelvin  5(F32)/9+273.15  C+273.15 
One thing you will probably notice is that the formulas aren't exactly the same in the code. The reason is because the code is designed to be optimized, and rather than displaying each temperature conversion by itself, you can simply add the respective formulas as modifiers and display all of the temperature conversions together.
Calculates the number of days between two days.
dbd(date1, date2)
Date format — one of:
 DDMM.YY
 MM.DDYY
On the TI83, press:
 2nd FINANCE to access the finance menu.
 ALPHA D to select dbd(, or use arrows and ENTER.
On the TI83+ or higher, press:
 APPS to access the applications menu.
 ENTER to select Finance…
 ALPHA D to select dbd(, or use arrows and ENTER.
TI83/84/+/SE
2 bytes
The dbd( command calculates the number of days between two dates. Each date is encoded as a single number in one of two formats (two formats can be mixed in the same command):
 day, month, year — DDMM.YY (e.g. April 26, 1989 would be 2604.89)
 month, day, year — MM.DDYY (e.g. April 26, 1989 would be 04.2689 or just 4.2689)
Because this is just a number like any other, leading zeroes and trailing zeroes after the decimal can be dropped. For example, January 1, 2000 does not have to be formatted as 0101.00 but can be simply 101.
Since there are only two digits for the year, obviously only a century's worth of dates can be handled. The calculator assumes this range to be from January 1, 1950 to December 31, 2049.
If the second date comes before the first, dbd( will return a negative number of days, so the range of possible results is from 36524 to 36524.
Finally, dbd( will also work for list inputs in the usual manner: a single date will be compared against every date in a list, and two lists of dates will be paired up.
dbd(612.07,2512.07
19
dbd(1.0207,1.0107
1
dbd(1.0107,{2.0107,3.0107,4.0107})
{31 59 90}
Advanced Uses
The dbd( command can be used to calculate the day of week without using the dayOfWk( command, which is only available on the TI84+ or higher.
Error Conditions
 ERR:DOMAIN is thrown if a date is improperly formatted.
Related Commands
See Also
:Repeat 0
:Input "",Str1
:Disp randInt(1,E3
:End
This routine allows you to mess with people who aren't very knowledgeable about the calculator, and don't know how to exit out of an infinite loop. The routine is very simple in that it fakes the home screen, giving the user the appearance that they can operate the calculator as usual.
When the user inputs a number or some text (both are acceptable because it is being stored to a string), the calculator randomly selects a number between 1 and 1000, and displays it on the screen. This process will be repeated over and over again until the user either presses [ON] or [2nd][QUIT]. In any case, this should provide you with some basic humor for a minute or two.
Another way to do this, that allows for results closer to the actual answer, is to store the input to a real variable. With large calculations it is virtually undetectable and rarely give the right answer, but if the user tries to enter in anything other than a number, it will cause the program to crash.
the code for this is
:ClrHome
:While 1
:Input "",A
:Disp A+randInt(50,50
:End
Alternatively, to guarantee that the correct answer will never be displayed, the following code can be used:
:ClrHome
:While 1
:Input "",A
:A→B
:While A=B
:A+randInt(50,50→B
:End
:Disp B
:End
Or if you really want to be tricky, you can modify the answer only if it is a decimal and/or number larger than 1000 sometimes and sometimes give the right answer. This way people will have less of a chance of noticing that the calculator is displaying the wrong answer.
:ClrHome
:While 1
:Input "",A
:Disp A+randInt(1,1)(fPart(A)rand+randInt(10,10)(A>1000
:End
:ClrHome
:Disp "What is your pro","blem?
:Repeat Str1="Shut up
:Input ">",Str1
:int(3rand→A
:">Can you say tha","t in a different","way?
:If A=1:">Can you explain ","in more detail, ","please?
:If not(A:">And how does tha","t make you feel?
:Output(1,1,Ans
:End
A Chatbot is a type of AI which is able to simulate an intelligent conversation with a person. A typical conversation consists of the person asking the chatbot questions, and the chatbot giving relevant responses. The way the chatbot determines a response is by breaking down the person's statements into the individual words and phrases, and looking up an appropriate response in its database (where its "knowledge" is stored).
Obviously, the more sophisticated a chatbot is, the larger the database of words and phrases needs to be, and likewise the larger the chatbot logic will be. In our simple chatbot, there are only three phrases that the chatbot will say, and the phrases are determined purely by random chance.
When you type in a statement, the chatbot will respond back with its own statement. You can keep "talking" with the chatbot for however long you want, but all you need to type to have it quit is just "Shut up". Because the routine uses Str1, you should clean it up at the end of your program.
Sets the v and w sequence equations to be graphed against each other.
vwAxes
When Seq mode is enabled, press:
 2nd FORMAT to access the format menu.
 Use arrows to select vwAxes.
TI83/84/+/SE
2 bytes
When vwAxes is enabled, and the calculator is in Seq mode, the equations v and w will be graphed against each other (that is, the points (v(n),w(n)) are graphed for the values of n between nMin and nMax). With this setting, sequence mode graphs are a bit like parametric mode, except the parameter n is always an integer, and recursive definitions are possible.
The equation u is ignored when in vwAxes mode.
See "Related Commands" for other possibilities of graphing sequences.
Error Conditions
 ERR:INVALID is thrown if either v or w is undefined.
Related Commands
Sets the u and w sequence equations to be graphed against each other.
uwAxes
When Seq mode is enabled, press:
 2nd FORMAT to access the format menu.
 Use arrows to select uwAxes.
TI83/84/+/SE
2 bytes
When uwAxes is enabled, and the calculator is in Seq mode, the equations u and w will be graphed against each other (that is, the points (u(n),w(n)) are graphed for the values of n between nMin and nMax). With this setting, sequence mode graphs are a bit like parametric mode, except the parameter n is always an integer, and recursive definitions are possible.
The equation v is ignored when in uwAxes mode.
See "Related Commands" for other possibilities of graphing sequences.
Error Conditions
 ERR:INVALID is thrown if either u or w is undefined.
Related Commands
Sets the u and v sequence equations to be graphed against each other.
uvAxes
When Seq mode is enabled, press:
 2nd FORMAT to access the format menu.
 Use arrows to select uvAxes.
TI83/84/+/SE
2 bytes
When uvAxes is enabled, and the calculator is in Seq mode, the equations u and v will be graphed against each other (that is, the points (u(n),v(n)) are graphed for the values of n between nMin and nMax). With this setting, sequence mode graphs are a bit like parametric mode, except the parameter n is always an integer, and recursive definitions are possible.
The equation w is ignored when in uvAxes mode.
See "Related Commands" for other possibilities of graphing sequences.
Error Conditions
 ERR:INVALID is thrown if either u or v is undefined.
Related Commands
Sets sequence equations to be graphed as web diagrams.
Web
While in Seq mode, press:
 2nd FORMAT to access the format menu.
 Use arrows and ENTER to select Web.
TI83/84/+/SE
2 bytes
In Web mode, sequence equations are graphed as web diagrams. This is a way of visualizing iterations of a function (that is, the sequence n, f(n), f(f(n)), f(f(f(n))), … for some function f and starting value n). For this mode to properly work, each sequence equation should be in terms of its previous value only: u(n) should be a function of u(n1). Referencing other sequence equations, or u(n2), will yield ERR:INVALID; referencing the value n is allowed by the calculator, but makes the result meaningless so you should avoid it.
When you go to the graph screen, the associated function y=f(x) will be graphed. That is, if you define u(n) = cos(u(n1)), the function y=cos(x) will be graphed. If you have AxesOn enabled, the line y=x will also be graphed. It's easy to see that the intersection points of the graphs y=f(x) and the line y=x represent the fixed points (points such that f(x)=x) of the function.
The web diagram itself will be drawn if you press TRACE or use the Trace command. First you will choose the equation (u, v, or w) to trace; then, by pressing RIGHT repeatedly, the web will be drawn, starting from the initial value nMin. In a web diagram, a point (n, f(n)) on the graph of y=f(x) is connected by a horizontal segment to the point (f(n), f(n)) on the graph of y=x, and then by a vertical segment to the point (f(n), f(f(n))) on the graph of y=f(x) again; this process is repeated. Each pair of a horizontal and vertical segment represents an added iteration of.
Web diagrams can be used to look at the attracting behavior of fixed points. For example:
1. Graph the equation u(n)=cos(u(n1)), u(nMin)=1 in Web mode, with Xmin=0, Xmax=1, Ymin=0, Ymax=1 in the WINDOW menu. You'll see that it has a single fixed point. If you TRACE the graph, the line segments will spiral around into the fixed point, so appears to be attractive.
2. Graph the equation u(n)=π/2cos(u(n1)), u(nMin)=1 in Web mode, with Xmin=0, Xmax=π/2, Ymin=0, Ymax=π/2 in the WINDOW menu. This equation looks a lot like the previous one, and also has a single fixed point. However, if you TRACE the graph, the line segments (which start out quite close to the fixed point) will spiral away from it. This intuitively shows that the fixed point of f(x)=π/2cos(x) is not attractive.
See "Related Commands" for other possibilities of graphing sequences.
Error Conditions
 ERR:INVALID is thrown if an equation being graphed references other sequence equations or the n2 term.
Related Commands
Sets the way sequence equations are graphed to value vs. time.
Time
While in Seq mode, press:
 2nd FORMAT to access the format menu.
 ENTER to select Time
TI83/84/+/SE
2 bytes
NOTE: This article is about the Time setting for sequence graphing. If you're looking for the clock commands on the TI84 Plus and TI84 Plus SE, see Time and Date Commands.
The Time command sets equations in sequence mode to graph as the points (n, u(n)) (for the u equation; (n, v(n)) and (n, w(n)) for the other two)  the default setting. In dot mode, only the points themselves will be plotted, but if you change the graphing style to connected line or thick line, the points will be connected.
Essentially, this mode makes sequence graphs a limited version of function graphs, but with the possibility of recursion.
See "Related Commands" for other possibilities of graphing sequences.
Related Commands
Graphs two functions and shades the area between them.
Shade(lower func, upper func, [xmin, xmax, pattern #, resolution])
Press:
 2nd DRAW to access the draw menu.
 7 to select Shade(, or use arrows.
TI83/84/+/SE
1 byte
The Shade( command draws two functions and shades the area between them.
Shade(lower func, upper func, [xmin, xmax, pattern #, resolution])
 lowerfunc and upperfunc are the two functions (whenever lowerfunc<upperfunc, the area between them will be shaded)
 xmin and xmax (optional) are left and right boundaries on where to shade.
 pattern # (optional) is an integer 14 determining which pattern to use:
 1 — vertical shading (default)
 2 — horizontal shading
 3 — diagonal shading (negative slope)
 4 — diagonal shading (positive slope)
 resolution (optional) is an integer 18 determining the spacing between shading lines. When it's 1 (default), everything is shaded, when it's 2, one pixel is skipped between lines, and so on  when it's 8, seven pixels are skipped.
Note that if you don't supply the resolution argument, it defaults to 1 and everything gets shaded regardless of the pattern.
Advanced Uses
Shade(Ymin,Ymax) is the smallest (though not the fastest) way to shade the entire screen.
Related Commands
See Also
Raises the constant e to the value power.
e^(value)
Press [2nd] [e^{x}] to paste e^(.
TI83/84/+/SE
1 byte
The e^( command raises the constant e to a power. Since it's possible to just type out e, ^, and (, the reason for having a separate function isn't immediately obvious but in fact most of the time you need to use e, it's to raise it to a power.
The trigonometric and hyperbolic functions can be expressed, and in fact are usually defined, in terms of e^(.
e^( accepts numbers and lists (but unfortunately not matrices) as arguments. It also works, and is often used for, complex numbers (in fact, one of the standard forms of complex numbers on TI83 series calculators is re^θi, which uses the e^( function)
e^(2)
7.389056099
e^(πi)
1
e^({1,0,1})
{.3678794412 1 2.718281828}
Formulas
The e^( is usually defined by an infinite series:
(1)This is then used to define exponentiation in general (for all real and even complex numbers), rather than using some sort of definition of exponents that involves multiplying a number by itself many times (which only works for integers).
Related Commands
e is a constant on the TI83 series calculators. The constant holds the approximate value of Euler's number, fairly important in calculus and other higherlevel mathematics.
The approximate value, to as many digits as stored in the calculator, is 2.718281828459…
The main use of e is as the base of the exponential function e^( (which is also a separate function on the calculator), and its inverse, the natural logarithm ln(. From these functions, others such as the trigonometric functions (e.g. sin() and the hyperbolic functions (e.g. sinh() can be defined. In re^θi mode, e is used in an alternate form of expressing complex numbers.
Important as the number e is, nine times out of ten you won't need the constant itself when using your calculator, but rather the e^( and ln( functions.
Related Commands
Shades in a circle.
R  the radius of the circle
A  the X coordinate of the circle's center
B  the Y coordinate of the circle's center
None
N, R, A, B
TI83/84/+/SE
Jutt
URL: United TI
:For(N,0,R,ΔX
:√(R²N²
:Line(A+N,BAns,A+N,B+Ans
:Line(AN,BAns,AN,B+Ans
:End
Although it is possible to shade in a circle using the Shade( command (i.e., Shade(√(R²(XA)²)+B,√(R²(XA)²)+B)), that is actually quite impractical in a real program because of its slow speed. Fortunately, you can improve upon that by using your own routine.
When graphing a circle, there are a few main things you need to know: the radius and the (X,Y) coordinates of the center. In our routine, the R variable is the radius, the A variable is the circle's X coordinate and the B variable is the circle's Y coordinate.
Rather than displaying the circle as one big circle, we are going to display it line by line using a For( loop, starting from the center. The √(R²N² formula is based on the circle formula R^{2}=(X–H)^{2}+(Y–K)^{2}, with the formula rearranged to get the respective part of the circle.
The circle should display pretty quickly, but it all depends on the values that you chose for the variables; smaller values will be faster, and likewise larger values will be slower. In addition, the circle may not display correctly if you don't have the right graph settings, so you should set your calculator to a friendly graphing window.
Puts the calculator into simultaneous graphing mode.
Simul
While editing a program, press:
 MODE to access the mode menu.
 Use arrows and ENTER to select Simul.
TI83/84/+/SE
2 bytes
Simul puts the calculator into simultaneous graphing mode. When multiple equations are enabled at the same time, simultaneous graphing mode graphs them at the same time (as opposed to Sequential mode, in which they will be graphed one after the other)
If you use a list in an equation, as with Y1={1,2,3}X, this will graph several equations that will always graph separately, regardless of this setting, which only affects multiple functions in different equation variables.
Related Commands
Puts the calculator into sequential graphing mode.
Sequential
While editing a program, press:
 MODE to access the mode menu.
 Use arrows and ENTER to select Sequential.
TI83/84/+/SE
2 bytes
Puts the calculator into sequential graphing mode (the default). When multiple equations are enabled at the same time, sequential graphing mode means that they will be graphed one after the other (as opposed to Simul mode, in which they will be graphed simultaneously)
If you use a list in an equation, as with Y1={1,2,3}X, this will graph several equations that will always graph separately, regardless of this setting, which only affects multiple functions in different equation variables.
Make sure not to confuse this with Seq mode, which is referred to in this guide as sequence graphing mode.
Related Commands
Puts the calculator in engineering notation mode.
Eng
While editing a program, press:
 MODE to access the mode menu.
 Use arrows and ENTER to select Eng.
TI83/84/+/SE
1 byte
The Eng command puts the calculator in engineering notation mode. This is a variation on scientific notation in which the exponent is restricted to be a multiple of 3 (and the mantissa can range between 1 and 1000, not including 1000 itself)
Eng
Done
12345
12.345e3
{1,2,3}
{1e0 2e0 3e0}
Related Commands
Puts the calculator in scientific notation mode.
Sci
While editing a program, press:
 MODE to access the mode menu.
 Use arrows and ENTER to select Sci.
TI83/84/+/SE
1 byte
The Sci command puts the calculator in scientific notation mode, so that all results are displayed in scientific notation: as a (possibly fractional) number between 1 and 10 (not including 10) multiplied by a power of 10.
Sci
Done
1000
1e3
{1,2,3}
{1e0 2e0 3e0}
Related Commands
Puts the calculator in "normal" mode regarding scientific notation.
Normal
While editing a program, press:
 MODE to access the mode menu.
 ENTER to select Normal.
TI83/84/+/SE
1 byte
The Normal command puts the calculator in normal number mode, in which it only uses scientific notation for large enough numbers (10 000 000 000 or higher), negative numbers large enough in absolute value (10 000 000 000 or lower), or numbers close enough to 0 (less than .001 and greater than .001)
The other possible settings are Sci (which always uses scientific notation), or Eng (which uses a specific form of scientific notation based on powers of 1000)
Related Commands
Returns a list of the frequency of values in another list.
L₁  the list you want to find the frequency of
L₂  the values of L₁ without repetition
L₃  the frequencies of the values in the list L₂
L₁, L₂, L₃, I
TI83/84/+/SE
DarkerLine
URL: United TI
:{L₁(1→L₂
:{1→L₃
:For(I,2,dim(L₁
:If max(L₂=L₁(I:Then
:L₃+(L₂=L₁(I→L₂
:Else
:augment(L₂,{L₁(I→L₂
:augment(L₂,{1→L₃
:End:End
With our list of values stored in L₁, we store the first element of L₁ to L₂ to initialize it, and store a value of one to L₃ because that value has appeared once in the list (by default it is the first value and thus we know it appeared). We then begin looping in the second element to avoid an extra increment and then through all of the elements of L₁.
When determining the frequency of a value, we need to check to see if the particular element (in this case, L₁(I)) has already appeared in L₂. If it has, we increment (add one) to its respective frequency in L₂. However, if the value has never appeared in L₁, we add that value as a new element to the end of L₂ and also set its frequency to one. We repeat this until we have the frequency of all of the values in L₁ stored in L₂.
When you are done using L₁, L₂, and L₃, you should clean them up at the end of your program.
The E symbol is used for entering numbers in scientific notation.
mantissa E exponent
Press [2nd][EE] to paste the E command.
TI83/84/+/SE
1 byte
The E symbol is used for entering numbers in scientific notation: it's short for *10^. This means that in many cases, its function is identical to that of the 10^( command (aside from the parenthesis). However, the exponent of E is limited to constant integer values ‾99 to 99.
The E symbol is used in display by the calculator for large numbers, or when in Sci (scientific) or Eng (engineering) mode.
Unlike the exponent of E, the mantissa (a special term for the A in A*10^B, in scientific notation) isn't limited in variable type: it can be a constant, a real or complex variable or expression, a list, a matrix, or even omitted entirely (and then it will be assumed to equal 1). The reason for this versatility is simple: internally, only the exponent is taken to be an actual argument for this command. The rest of the calculation is done through implied multiplication.
5E3
………………5000
E‾5
……………….00001
Advanced Uses
E99 and E99 are often used for negative and positive infinity because the TI83 series of calculators doesn't have an infinity symbol. Commands that often need to use infinity include solve(, fnInt(, normalcdf( (and the other distributions), and many others. The error introduced in this way is usually irrelevant, because it's less than the minimum calculator precision, anyway: E99 is mindbogglingly huge.
Optimization
Don't add the mantissa when it's 1:
1E5
should be
E5
In addition, E2 or E3 can be used as shorthand ways of writing 100 and 1000 respectively. This could be continued, in theory, for higher powers of 10, but those aren't necessary as often.
Command Timings
E is much faster than using the 10^( command or typing out 10^. The drawback, of course, is that it's limited to constant values.
Related Commands
Puts the calculator in fixedpoint display mode, displaying value digits after the decimal.
Fix value
While editing a program, press:
 MODE to access the mode menu.
 Use arrows to select a number 09 from the 2nd line.
This will paste Fix number. Outside a program, it will simply put the calculator in the appropriate mode.
TI83/84/+/SE
1 byte
The Fix command puts the calculator in fixedpoint display mode: all numbers will be displayed with a fixed number of digits (09) after the decimal, depending on the argument of Fix. This could be useful if you're trying to display potentially fractional numbers in a limited amount of space.
A note on more technical aspects: first, if more digits are available than are displayed, the calculator will round off the displayed number (but not its stored value), so 3.97 will be displayed as 4 in Fix 1 mode. Second, the Fix command can't force more than 10 significant digits to be displayed, so something like 123456789.1 will only display one decimal digit even in Fix 9 mode.
Finally, note that the Float and Fix commands only change the way numbers are displayed: they are saved in the same way in each case. Even if you're in Fix 0 mode, the calculations are not done using integers, and in general, the calculations are still done using floatingpoint numbers no matter the number mode. The one exception is with regressions: if you store a regression to an equation in Fix N mode, it will truncate the numbers involved before storing them to the equation, and as a result, the equation will be different.
Related Commands
Puts the calculator in floating decimal display mode.
Float
Press:
 MODE to access the mode menu.
 Use arrows and ENTER to select Float.
TI83/84/+/SE
1 byte
The Float command makes the calculator display numbers with a "floating decimal point" — only as many digits after the decimal as needed are displayed (so whole numbers, for example, are shown without any decimal points). This is the default mode, and usually the most useful.
A technicality of displaying real numbers on the calculator: A maximum of 14 significant digits are stored in a number, but only 10 of them are actually displayed (or used for comparisons) — the rest are used for additional precision. This means that if a number is displayed as a whole number, it isn't necessarily whole. For example, 1234567890.7 will be displayed as 1234567891 (rounded to 10 significant digits), and 1.0000000003 will be displayed as 1.
This makes sense from many perspectives: if you get a result of 1.0000000003 after a calculation, odds are that this should be 1, and isn't just because of a precision error. Because the extra digits are there, though, even if they're not displayed, such a number will still be invalid for functions such as PxlOn( or sub( that want integer arguments, and this sort of error is hard to track down.
Finally, note that the Float and Fix commands only change the way numbers are displayed: they are saved in the same way in each case. Even if you're in Fix 0 mode, the calculations are not done using integers, and in general the calculations are still done using floatingpoint numbers no matter the number mode. The one exception is with regressions: if you store a regression to an equation in Fix N mode, it will truncate the numbers involved before storing them to the equation, and as a result, the equation will be different.
Related Commands
Sets all equations to use the dottedline graphing style, and makes it the default setting.
Dot
Press:
 MODE to access the mode menu.
 Use arrows to select Dot.
TI83/84/+/SE
2 bytes
The Dot command sets all equations to use the disconnected "dottedline" graph style: it calculates and draws points on the graph, but doesn't connect them. In addition, this graph style is made the default, so that when a variable is deleted it will revert to this graph style. The other possible setting for this option is Connected.
Compare this to the GraphStyle( command, which puts a single equation into a specified graph style.
The Connected and Dot commands don't depend on graphing mode, and will always affect all functions, even in other graphing modes. The exception to this is that sequence mode's default is always the dottedline style, even when Connected mode is set. The Connected command will still change their graphing style, it just won't change the default they revert to.
In addition to graphing equations, this setting also affects the output of DrawF, DrawInv, and Tangent(.
Advanced Uses
Functions graphed using the dottedline graph style are very strongly affected by the Xres setting (which determines how many points on a graph are chosen to be graphed). If Xres is a high setting (which means many pixels are skipped), functions in dottedline mode will be made up of fewer points (in connected mode, this will also be the case, but because the points are connected this isn't as noticeable). You should probably set Xres to 1 if you're going to be using the dottedline graph style — even 2 is pushing it.
Related Commands
Sets all equations to use the connected graphing style, and makes it the default setting.
Connected
Press:
 MODE to access the mode menu.
 Use arrows to select Connected.
TI83/84/+/SE (Not available on TI84+CE calculators)
2 bytes
The Connected command sets all equations to use the usual graph style  a connected line. In addition, this graph style is made the default, so that when a variable is deleted it will revert to this graph style. The other possible setting for this option is Dot.
Compare this to the GraphStyle( command, which puts a single equation into a specified graph style.
The Connected and Dot commands don't depend on graphing mode, and will always affect all functions, even in other graphing modes. The exception to this is that sequence mode's default is always the dottedline style, even when Connected mode is set. The Connected command will still change their graphing style, it just won't change the default they revert to.
In addition to graphing equations, this setting also affects the output of DrawF, DrawInv, and Tangent(.
Related Commands
Take the square root of a number.
√(input)
Press 2nd √ to paste the √( command.
TI83/84/+/SE
1 byte
Takes the square root of a positive or negative number. It works exactly the same as 2^{×}√ or ^(1/2) but is smaller and uses an ending parenthesis. If used on a list, it will return a list with the square root of each element.
√(4)
2
√(2)
1.414213562
√({1,1})
{1 i}
This may return a complex number or throw ERR:NONREAL ANS (depending on mode settings) if taking the square root of a negative number.
Optimization
Never raise something to the onehalf power explicitly; use this command instead.
:X^(1/2)→X
can be
:√(X→X
Error Conditions
 ERR:NONREAL ANS when taking the square root of a negative number in Real mode.
Related Commands
Returns the reciprocal of a number (1 divided by the number). For matrices, finds the matrix inverse.
valueֿ¹
Press [xֿ¹]
TI83/84/+/SE
1 byte
The ֿ¹ command returns the reciprocal of a number, equivalent to dividing 1 by the number (although reciprocals are sometimes more convenient to type). It also works for lists, by calculating the reciprocal of each element.
The ֿ¹ command can also be used on matrices, but it is the matrix inverse that is computed, not the reciprocal of each element. If [A] is an N by N (square) matrix, then [A]ֿ¹ is the N by N matrix such that [A][A]ֿ¹=[A]ֿ¹[A] is the identity matrix. ֿ¹ does not work on nonsquare matrices.
4ֿ¹
.25
{1,2,3}ֿ¹
{1 .5 .3333333333}
[[3,2][4,3]]ֿ¹
[[3 2]
[4 3 ]]
Much like the number 0 does not have a reciprocal, some square matrices do not have inverses (they are called singular matrices) and you'll get an error when you try to invert them.
Optimization
Writing Aֿ¹B instead of B/A is sometimes beneficial when B is a complicated expression, because it allows you to take off closing parentheses of B. For example:
:(P+√(P²4Q))/2
can be
:2ֿ¹(P+√(P²4Q
This may be slower than dividing. There are also situations in which this optimization might lose precision, especially when the number being divided is large:
7fPart(4292/7
1
7fPart(7ֿ¹4292
.9999999999
Error Conditions
 ERR:DIVIDE BY 0 is thrown when trying to take the reciprocal of 0.
 ERR:SINGULAR MAT is thrown when trying to invert a singular matrix.
Related Commands
Calculates the day of week of a date, without using dayOfWk( (because it's only available on the 84+ and 84+SE)
D  The day
M  The month
Y  The year (1950 through 2049)
Ans  06 = the day of week (Sunday  Saturday)
D, M, Y, Ans
TI83/84/+/SE
:round(7fPart(dbd(101.5,DE2+M+fPart(.01Y))/7
Using the dbd( command, we return the number of days between the given date and January 1, 1950, our base date. dbd('s argument, in this case, is of the form DDMM.YY, so we put the date we're given in that form with DE2+M+fPart(.01Y. Once we have the number of days between the two dates, we divide it by seven (as there are seven days in a week) to get the number of weeks.
However, we are not interested in the number of weeks between two dates, we are interested in how far into the week we are. That would be the fractional part of the number of weeks. For example, if there was fourteen days between two dates (the first date being a Sunday) and we divide that by seven, we would have the equation 14/7=2.00. The .00 means that the week hasn't yet begun (and so, the day is Sunday).
If there was 15 days between two dates, the equation would give 15/7=2.1428571. The .1428571 means that we are .1428571 into the week, and if we multiply that by seven, we get the equation .1428571*7=1. This means that we are one day into the week (and so, the day is Monday). So in our formula, after finding out the number of days between two dates, we find the fractional part of it, and multiply that by seven. Finally, round( gets rid of any minor rounding errors.
As the 1^{st} of January, 1950 was a Sunday (which is the date we have inputed into the above routine), so the number of days into the week will always be relative to Sunday. That is, the output 0 through 6 is relative to the days Sunday through Saturday respectively. If you want 0 to be Monday instead, make the base date January 2 instead by changing 101.5 to 201.5.
This routine can handle dates from January 1, 1950 to December 31, 2049. For other dates, it will assume the year is in that range instead. There is also an alternative routine that handles dates in an unlimited range.
Display Day
Append the following code to display the day of the week:
:Disp sub("SUNDAY***MONDAY***TUESDAY**WEDNESDAYTHURSDAY*FRIDAY***SATURDAY*",9Ans+1,9 //replace *s with spaces
Or this code, which should display the day of the week, only the display method takes less space and space pads it.
Disp sub("***SUN***MON**TUESWEDNES*THURS***FRI*SATUR",6Ans+1,6)+"DAY //replace *s with spaces
Error Conditions
 ERR:DOMAIN if the date is invalid.
Related Routines
Twobyte tokens beginning with the byte 0xBB are miscellaneous tokens, used for various commands that didn't fit in the onebyte range. With later OS versions, various symbols were also added to the 0xBB tokens.
The two tables on this page are split by calculator type, which means that (among other things) the tokens in the second table can't be sent to a TI83 calculator from a TI83+ calculator. Further version differences: tokens CF through DA are available with OS 1.15 or higher. Tokens DB through F5 are available with OS 1.16 or higher.
Miscellaneous 2Byte Tokens (0x68  0xF5)  

6  7  8  9  A  B  C  D  E  F  
0  (prev. table)  Â  Î  Û  β  a  p  reserved  _{0}  x 
1  (prev. table)  Ä  Ï  Ü  γ  b  q  @  _{1}  ∫ 
2  (prev. table)  á  í  ú  Δ  c  r  #  _{2}  
3  (prev. table)  à  ì  ù  δ  d  s  $  _{3}  
4  (prev. table)  â  î  û  ε  e  t  &  _{4}  √ 
5  (prev. table)  ä  ï  ü  λ  f  u  `  _{5}  
6  (prev. table)  É  Ó  Ç  μ  g  v  ;  _{6}  
7  (prev. table)  È  Ò  ç  π  h  w  \  _{7}  
8  Archive  Ê  Ô  Ñ  ρ  i  x    _{8}  
9  UnArchive  Ë  Ö  ñ  Σ  j  y  _  _{9}  
A  Asm(  é  ó  ´  unused  k  z  %  _{10}  
B  AsmComp(  è  ò  `  φ  unused  σ  …  ←  
C  AsmPrgm  ê  ô  ¨  Ω  l  τ  ∠  →  
D  compiled asm  ë  ö  ¿  $\hat{p}$  m  Í  ß  ↑  
E  Á  unused  Ú  ¡  χ  n  GarbageCollect  ^{x}  ↓  
F  À  Ì  Ù  α  F  o  ~  _{T}  unused 
Returns the sum of the elements of a matrix.
[A]  the matrix whose elements you want to sum
Ans  the sum of the matrix elements
[A], L₁, Ans
TI83/84/+/SE
zada
URL: United TI
:dim([A]
:Matr►list(cumSum([A])^{T},Ans(1),L₁
:sum(L₁
The cumSum( command gets the cumulative sum of each column in the matrix, adding the value of the previous element to the next element, and repeating this for each consecutive element in the column. When the cumSum( command is finished, the last element in each column will contain the sum of that column. Taking the ^{T} (transpose) of the resulting matrix switches columns and rows.
Then, using the Matr►list( command, the last column of this result is stored to L₁. This column was originally the last row of cumSum('s output, so it contains all the column sums. Finally, by calculating the sum of that list, we get the total of the matrix elements. L₁ is no longer necessary, and can be deleted.
If you want to use the sum for future use, you can store it to a more permanent variable, such as A or X. When you are done using [A], you should clean it up at the end of your program.
The term "e" is ambiguous and may refer to:
 e, the mathematical natural logarithmic base constant.
 e^(, the exponent command raising an expression to the e constant.
 E, the scientific notation command for expressing very large or small numbers.
If an internal link led you here, you may wish to change the link to point directly to the intended article.
The ² command raises an input to the second power. It has exactly the same function as "^2", but is one byte smaller. If used on a list, it will return a list with all of the elements squared. If used on a matrix, it will return the second matrix power of the input matrix.
2²
4
{1,‾2,3}²
{1 4 9}
[[2,‾1][‾3,0]]²
[[1 ‾2]
[6 ‾3]]
Optimization
Use this command instead of ^2 in all instances.
:X^2
can be
:X²
Related Commands
 ^{1}
 ^{3}
Formats a displayed number as a degreeminutesecond angle.
value►DMS
Press:
 2nd ANGLE to access the angle menu.
 4 to select ►DMS, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The ►DMS command can be used when displaying a real number on the home screen, or with the Disp and Pause commands. It will then format the number as an angle with degree, minute, and second parts.
30►DMS
30°0'0"
100/9°►DMS
11°6'40"
It will also work when displaying a number by putting it on the last line of a program by itself. It does not work with Output(, Text(, or any other more complicated display commands.
Although ►DMS is meant as a way to format angles in Degree mode, it doesn't depend on the angle mode chosen, only on the number itself. Note that entering a number as degree°minute'second" will also work, in any mode, and it will not be converted to radians in Radian mode.
Error Conditions
 ERR:SYNTAX is thrown if the command is used somewhere other than the allowed display commands.
 ERR:DATA TYPE is thrown if the value is complex, or if given a list or matrix as argument.
Related Commands
R►Pθ( calculates the angle coordinate (in polar coordinates) given the Cartesian coordinates.
R►Pθ(x,y)
Press:
 2nd ANGLE to access the angle menu.
 6 to select R►Pθ(, or use arrows and ENTER.
TI83/84/+/SE
1 byte
R►Pθ( (Rectangular to polar θ) takes the (x,y) (Cartesian) coordinate, and returns the angle that the ray from (0,0) to (x,y) makes with the positive xaxis. This is the θcoordinate of the same point in (r,θ) (polar) mode. The identity used for this conversion is tan(θ)=y/x, with the correct inverse being chosen depending on the quadrant that the point is in. The range of the angle returned is π<θ≤π. R►Pθ( can also be used on lists.
R►Pθ( is equivalent to the atan2() instruction seen in C/++ and FORTRAN.
R►Pθ(3,4)
.927295218
tanֿ¹(4/3)
.927295218
R►Pθ(0,{1,1})
{1.570796327, 1.57096327}
R►Pθ( is affected by Degree and Radian mode in its output, which is an angle measured in degrees or radians respectively.
Advanced Uses
If you want the result to always be a radian angle, regardless of mode settings, you can divide the result by 1^{r}:
R►Pθ(x,y)/1^^r
If you want the result to always be a degree angle, regardless of mode settings, you can divide the result by 1°:
R►Pθ(x,y)/1°
Error Conditions
 ERR:DATA TYPE is thrown if you input a complex argument.
 ERR:DIM MISMATCH is thrown if two list arguments have different dimensions.
Related Commands
R►Pr( calculates the radius component (in polar coordinates) given the Cartesian coordinates.
R►Pr(x,y)
Press:
 2nd ANGLE to access the angle menu.
 5 to select R►Pr(, or use arrows and ENTER.
TI83/84/+/SE
1 byte
R►Pr( (Rectangular to polar radius) takes the (x,y) (Cartesian) coordinates, and gives the radius coordinate r of the same point in (r,θ) (polar) mode. The identity used for this conversion is r² = x²+y²
R►Pr(3,4)
5
√(3²+4²)
5
R►Pr({6,5},{8,12})
{10 13}
The function works even when the equivalent √(x²+y²) fails due to overflow:
R►Pr(3e99,4e99)
5e99
Optimization
R►Pr( is the smallest way to implement the distance formula $d=\sqrt{(x_1x_2)^2+(y_1y_2)^2}$. Just give the values x_{1}x_{2} and y_{1}  y_{2} as arguments:
:√((52)²+(40)²)
can be
:R►Pr(52,40)
Error Conditions
 ERR:DATA TYPE is thrown if you input a complex argument.
 ERR:DIM MISMATCH is thrown if two list arguments have different dimensions.
Related Commands
P►Ry( calculates the yvalue (in Cartesian coordinates) given Polar coordinates.
P►Ry(r,θ)
Press:
 2nd ANGLE to access the angle menu.
 8 to select P►Ry(, or use arrows and ENTER.
TI83/84/+/SE
1 byte
P►Ry( (polar to rectangular ycoordinate) calculates the ycoordinate of a polar point. Polar coordinates are of the form (r,θ), where θ is the counterclockwise angle made with the positive xaxis, and r is the distance away from the origin (the point (0,0)). The conversion identity y=r*sin(θ) is used to calculate P►Ry(.
The value returned depends on whether the calculator is in radian or degree mode. A full rotation around a circle is 2π radians, which is equal to 360°. The conversion from radians to degrees is angle*180/π and from degrees to radians is angle*π/180. The P►Ry( command also accepts a list of points.
P►Ry(5,π/4)
3.535533906
5*sin(π/4)
3.535533906
P►Ry({1,2},{π/4,π/3})
{.7071067812 1.732050808}
Advanced Uses
You can bypass the mode setting by using the ° (degree) and ^{r} (radian) symbols. This next command will return the same values no matter if your calculator is in degrees or radians:
P►Ry(1,{π/4^^r,60°})
{.7071067812 .8660254038}
Optimization
In most cases P►Ry(r,θ) can be replaced by r*sin(θ) to save a byte:
:P►Ry(5,π/12)
can be
:5sin(π/12)
Conversely, complicated expressions multiplied by a sine factor can be simplified by using P►Ry(r,θ) instead.
:(A+BX)sin(π/5)
can be
:P►Ry(A+BX,π/5)
Error Conditions
 ERR:DIM MISMATCH is thrown if two list arguments have different dimensions.
 ERR:DATA TYPE is thrown if you input a complex argument.
Related Commands
Displays random lines.
None
None
A, B, C
TI83/84/+/SE
:ClrDraw
:ZStandard
:Delvar ADelvar B
:Repeat getKey
:randInt(Xmin,Xmax→C
:randInt(Ymin,Ymax
:Line(A,B,C,Ans
:Ans→B:C→A
:End
Before we can start displaying random lines on the graph screen, we need to perform some basic setup. We then create two variables for the first (X,Y) coordinate by setting their initial values to zero. Once inside the Repeat loop, we randomly select the second (X,Y) coordinate for the line. (Please note we didn't need to store the second variable, since Ans is able to hold a numeric value, and it is also faster.)
Now that we have the two coordinates for the line figured out, we draw the line on the screen and store the first coordinate values to the second coordinate values, i.e., the second coordinate becomes the new first coordinate. This gets repeated over and over again until you press a key.
:ClrDraw
:0→Xmin:2→Xmax
:0→Ymin:1→Ymax
:rand→A:rand→B
:{0,1,2→L₁
:{0,1,0→L₂
:Repeat getKey
:randInt(1,3→C
:mean({A,L₁(C→A
:mean({B,L₂(C→B
:PtOn(A,B
:End
A Sierpinski triangle is a very common fractal that almost everybody has seen. It consists of a large triangle divided into three smaller triangles, which are then themselves divided into three smaller triangles, and this is repeated infinitely until the triangles are so small you can barely see them.
In order to construct a Sierpinski triangle on the calculator, you need to use the graph screen. Before we can use the graph screen, however, we need to perform some basic setup. We then create our variables: two lists (one for the X coordinates and one for the Y coordinates) and two numerics (one for a random X number and one for a random Y number).
Once we have our variables created, we start randomly coming up with places to display the pixels that will make up the triangle. Based on the formula used to generate the triangle, we take the average of the random list values and the random numbers that were generated, and use those for the coordinates of the next pixel. This gets repeated over and over again until either the triangle is completed or you press a key.
This command doesn't exist. A token for it does, though.
PrintScreen
This command requires a hex editor to access.
TI82
1 byte
On the TI82, the PrintScreen command could be found in the I/O submenu of the PRGM menu. According to the TI82 manual, it "prints the current screen on a printer attached to an IBM®compatible computer or a Macintosh® if you are using TIGRAPH LINK™ software". Aside from this potential interaction with computers, it was otherwise equivalent to Pause.
On the TI83 series calculators or higher, a token is still set aside for the PrintScreen command. However, the command doesn't actually do anything, and will cause an error if you try to use it. It's not accessible through any menus, though, so that's okay.
The only potential use is to save on memory if you ever need to display "PrintScreen" somewhere  you can display this token instead.
Error Conditions
 ERR:INVALID occurs if this statement is used outside a program.
 ERR:INVALID also occurs if this statement is used inside a program.
Displays the Pythagorean triples.
C  how many triples you want to display
None
A, B, C
TI83/84/+/SE
Weregoose
URL: United TI
:For(A,2,C
:For(B,1,A1
:Disp {A²B²,2AB,A²+B²
:If getKey:Pause
:End:End
A Pythagorean triple occurs when, while using the Pythagorean Theorem a^{2}+b^{2}=c^{2} to find the three sides of a right triangle, all three values are whole integers. For example, a common triple is 3,4,5 — in this case, 9 (3^{2}) + 16 (4^{2}) = 25 (5^{2}). The general formula that can be derived to figure out when a triple occurs is: a=(A^{2}B^{2}) b=(2AB) c=(A^{2}+B^{2}).
Now that you know what a Pythagorean triple is, the routine should be pretty clear. We are essentially looping over the range of values that we want to find triples in, and then displaying the triples as a three element list using the above mentioned formula. Because there can be many triples found, and displaying all of them would just be like a blur on the screen, the Pause command allows you to temporarily halt the program so you can see the triples that are currently displayed.
TIBasic features are fairly extensive set of commands and functionality, which allows you to do almost anything you want. This tutorial provides a brief overview of some of these things, along with links to further documentation available elsewhere on the wiki.
Basic Syntax
A TIBasic program consists of one or more statements, which can be commands, functions, or combination thereof. However, there are some general rules that you need to follow concerning syntax when using statements:
While a command or function looks like it just made up of individual characters that you can type in, it is in fact a token that must be obtained in the appropriate menu or by pressing a key on the calculator. Using tokens allows the calculator to quickly lookup a command or function, rather than having to compile it together before you can use it.
Each statement gets placed on its own line, which starts with a colon. The calculator automatically puts a colon at the beginning of the line, which cannot be edited. If you delete the line, however, the colon gets deleted as well. In addition to the builtin colons, you can artificially put multiple statements on the same line by separating each one with a colon. The calculator treats each of these statements as being on their own line.
There is no builtin support for comments, although you can make your own by using strings. If you place a string of text inside a double quote on its own line, the calculator will simply read through this and not do anything with it. The calculator does not allow you to put quotes or the store arrow inside a string because those are used for indicating the beginning and end of the string.
Whitespace is not allowed between the arguments of a command or function, and will cause an error if you try to put it there. However, if you have whitespace inside a string, the space is preserved by the calculator, and will impact how the string appears on the screen or gets used in the program. In addition, blank lines in a program are perfectly legal, although they do take up space.
You can omit the closing parenthesis, quote, square bracket, curly brace, etc. at the end of a command or function. Each of these things take up space, and will impact the size of a program. However, if you have a complex expression involving lots of math, or you have multiple commands on one line, then you should keep them.
(for more information, see Tokens and Token Size, Code Conventions, and Commenting Your Code)
Variable Types
TIBasic has four main builtin variable types: numerics, lists, matrices, and strings. Unlike other programming languages, TIBasic does not allow you to create your own variables (with the exception of custom lists), and all of the variables are available globally across the calculator. You can use the variables inside functions and commands, and even combine several of them together to make new variables.
Numerics
A numeric represents a single number value, such as 5 or 2683.45, and there are 27 numeric variables (AZ and theta). A value can be either real or complex (meaning it is an imaginary number), and the calculator represents each number as a floating point, with 14 decimal positions stored (although only 10 are accessible).
:5→A
Lists
A list represents a collection of expressions, consisting of numbers and/or numeric variables, stored together as one variable. There are six builtin list variables (L1,…,L6). You can also make your own custom list by using the little L character. When you construct a list, you need to put an opening curly brace, and then separate each value with a comma. You can have up to 999 values in a list.
:{1,B,2,C→L1
Matrices
A matrix represents a collection of expressions, consisting of numbers and/or numeric variables, stored together as one twodimensional (row x column) variable. There are ten builtin matrix variables ([A],…[J]). When you construct a matrix, you need to put an opening square bracket, place an opening and closing bracket around each row, and separate each value with a comma. You can have up to 99x99 in a matrix.
:[[1,2,3][4,5,6→[A]
Strings
A string represents a sequence of characters, consisting of letters, numbers, symbols, commands, and functions, stored together as one variable. There are ten builtin string variables (Str1,…,Str0). When you construct a string, you need to put an opening double quote, and then list the characters one after another. A string's size is limited only by the amount of free RAM available.
:"ABC DEF 123→Str1
(for more information, see Variable Types)
Program Flow
TIBasic has the majority of the standard conditional and looping structures that you find in other programming languages. A condition can be almost anything, including values, variables, or a combination thereof. Because of the way that TIBasic interprets expressions, a condition is true if its value is one or nonzero, and false if its value is zero.
Conditionals
The simplest conditional involves just using the If command. You usually only use this when you just have one command or statement that you want to be executed. If you have two or more statements that you want executed when the conditional is true, you need to add a Then and End command to the If statement. The Then goes on the line right after the If command, and the End command goes after all of the statements that you want executed.
The most complicated conditional is when you want to execute certain statements if the condition is true, and other statements if the condition is false. The conditional looks essentially the same as the multiline conditional, with the only difference being that you insert an Else command in between the true and false statements.
:If A=2:Then
:Disp "A was 2
:A→B
:End
Loops
There are three different kinds of loops: While, Repeat, and For(. A While loop loops while the condition is true, whereas a Repeat loop repeats itself until the condition is true. A For( loop is essentially a specialized While loop, with the main differences being that it loops a set number of times and it has the condition builtin.
:For(X,1,8
:Output(X,1,"Hello
:End
Branching
Branching allows the calculator to jump from one point in a program to another. You use the Goto and Lbl commands together to achieve this. The Lbl command specifies a location in the program, and the Goto command tells the program to jump to the location with the matching label. Loops are generally preferred over branching because it has some major disadvantages associated with using it.
:Goto A
...
:Lbl A
(for more information, see Controlling Program Flow and Logical Operators)
<< Introduction to TIBasic  Table of Contents  Your First Program >> 
Puts the calculator into re^θi mode.
re^θi
Press:
 MODE to access the mode menu.
 Use the arrow keys and ENTER to select re^θi
TI83/84/+/SE
1 byte
The re^θi command puts the calculator into polar complex number mode. This means that:
 Taking square roots of negative numbers, and similar operations, no longer returns an error.
 Complex results are displayed in the form re^(θi) (hence the name of the command)
The mathematical underpinning of this complex number format is due to the fact that if (x,y) is a point in the plane using the normal coordinates, it can also be represented using coordinates (r,θ) where r is the distance from the origin and θ is the angle that the line segment to the point from the origin makes to the positive xaxis (see Polar and PolarGC for more information on polar coordinates and graphing). What does this have to do with complex numbers? Simple: if x+yi is a complex number in normal (rectangular) form, and re^(θi) is the same number in polar form, then (x,y) and (r,θ) represent the same point in the plane.
Of course, that has a lot to do with how you define imaginary exponents, which isn't that obvious.
An equivalent form to polar form is the form r[cos(θ)+isin(θ)].
Unfortunately, the calculator seems to have some confusion about the use of degree and radian angle measures for θ in this mode (the answer is: you can only use radians — degrees make no sense with complex exponents). When calculating a value re^(θi) by using the e^( command and plugging in numbers, the calculator assumes θ is a radian angle, whether it's in Degree or Radian mode. However, when displaying a complex number as re^(θi), the calculator will display θ in radian or degree measure, whichever is enabled. This may lead to such pathological output as:
Degree:re^θi
Done
e^(πi)
1e^(180i)
Ans=e^(180i)
0 (false)
It's recommended, then, to use Radian mode whenever you're in re^θi mode.
Related Commands
Puts the calculator into a+bi mode.
a+bi
Press:
 MODE to access the mode menu.
 Use the arrow keys and ENTER to select a+bi
TI83/84/+/SE
1 byte
The a+bi command puts the calculator into rectangular complex number mode. This means that:
 Taking square roots of negative numbers, and similar operations, no longer returns an error.
 Complex results are displayed in the form a+bi (hence the name of the command)
This is the standard way of displaying complex numbers, though they can also be displayed in polar form (see re^θi for more details). To extract the coefficients a and b, use the real( and imag( commands.
Advanced Uses
Rather than switch to a+bi mode, you might want to force the calculations to use complex numbers by making the original argument complex. The general way to do this is by adding +0i to the number. However, there may be an optimization in any particular case. See the quadratic formula routine for a good example of this.
Real
Done
√(1)
(causes an error)
√(1+0i)
i
Related Commands
See Also
Enables real number only mode.
Real
While editing a program, press:
 MODE to access the mode menu.
 Use arrows and ENTER to select Real.
TI83/84/+/SE
1 byte
The Real command puts the calculator in real numberonly mode. This shouldn't be taken quite literally, as you can still type in i to get complex numbers, and do operations with them (they will be displayed as in a+bi mode, in that case). However, any operation done with real numbers that comes out to a complex result, such as taking the square root of a negative number, will throw a ERR:NONREAL ANS error.
There is no real advantage to using Real mode over a+bi mode — it just adds another error condition that wouldn't be triggered otherwise. However, it is the default setting, and so there's a good chance that the calculator will be in Real mode when someone runs your program. Thus, when using complex numbers implicitly (such as in a quadratic equation solver) you should do something about this.
Advanced Uses
Rather than switch to a+bi mode, you might want to force the calculations to use complex numbers by making the original argument complex. The general way to do this is by adding +0i to the number. However, there may be an optimization in any particular case. See the quadratic formula routine for a good example of this.
Real
Done
√(1)
(causes an error)
√(1+0i)
i
Related Commands
See Also
Puts the calculator in Degree mode.
Degree
While editing a program, press:
 MODE to access the mode menu.
 Use arrows and ENTER to select Degree.
TI83/84/+/SE
1 byte
The Degree command puts the calculator into Degree mode, where the inputs and/or outputs to trig functions are assumed to be degree angles.
Angles measured in degrees range from 0 to 360, with 0 being an empty angle, 90 being a right angle, 180 being a straight angle, and 360 being a full angle all the way around a circle.
To convert from a radian angle to a degree angle, multiply by 180/π. To go the other way, and get a radian angle from a degree angle, multiply by π/180.
The following commands are affected by whether the calculator is in Radian or Degree mode:
The input is differently interpreted:
The output is differently expressed:
However, some commands are notably unaffected by angle mode, even though they involve angles, and this may cause confusion. This happens with the SinReg command, which assumes that the calculator is in Radian mode even when it's not. As a result, the regression model it generates will graph incorrectly in Degree mode.
Also, complex numbers in polar form are an endless source of confusion. The angle( command, as well as the polar display format, are affected by angle mode. However, complex exponentials (see the e^( command), defined as $e^{i\theta}=\cos\theta+i\sin\theta$, are evaluated as though in Radian mode, regardless of the angle mode. This gives mysterious results like the following:
Degree:re^θi
Done
e^(πi)
1e^(180i)
Ans=e^(180i)
0 (false)
Overall, it's better to put your calculator in Radian mode when dealing with polar form of complex numbers, especially since no mathematician would ever use degrees for the purpose anyway.
Optimization
It's sometimes beneficial to use the ° symbol instead of switching to Degree mode. The ° symbol will make sure a number is interpreted as a degree angle, even in Radian mode, so that, for example:
Radian
Done
sin(90)
.8011526357
sin(90°)
1
This is smaller when only one trig calculation needs to be done. Also, it doesn't change the user's settings, which are good to preserve whenever possible.
Related Commands
Puts the calculator in Radian mode.
Radian
While editing a program, press:
 MODE to access the mode menu.
 Use arrows and ENTER to select Radian.
TI83/84/+/SE/CE
1 byte
The Radian command puts the calculator into Radian mode, where the inputs and/or outputs to trig functions are assumed to be radian angles.
Angles measured in radians range from 0 to 2π. They are defined as the arc length of the arc, on a unit circle (circle with radius 1), that corresponds to the angle when it is placed in the center. This definition actually only differs from degree measurements by a constant factor.
To convert from a degree angle to a radian angle, multiply by 180/π. To go the other way, and get a radian angle from a degree angle, multiply by π/180.
The following commands are affected by whether the calculator is in Radian or Degree mode:
The input is differently interpreted:
The output is differently expressed:
However, some commands are notably unaffected by angle mode, even though they involve angles, and this may cause confusion. This happens with the SinReg command, which assumes that the calculator is in Radian mode even when it's not. As a result, the regression model it generates will graph incorrectly in Degree mode.
Also, complex numbers in polar form are an endless source of confusion. The angle( command, as well as the polar display format, are affected by angle mode. However, complex exponentials (see the e^( command), defined as $e^{i\theta}=\cos\theta+i\sin\theta$, are evaluated as though in Radian mode, regardless of the angle mode. This gives mysterious results like the following:
Degree:re^θi
Done
e^(πi)
1e^(180i)
Ans=e^(180i)
0 (false)
Overall, it's better to put your calculator in Radian mode when dealing with polar form of complex numbers, especially since no mathematician would ever use degrees for the purpose anyway.
Optimization
It's sometimes beneficial to use the ^{r} command instead of switching to Radian mode. The ^{r} symbol will make sure a number is interpreted as a radian angle, even in degree mode, so that, for example:
Degree
………………Done
sin(π)
……………….0548036651
sin(π^{r})
………………0
This is smaller when only one trig calculation needs to be done. Also, it doesn't change the user's settings, which are good to preserve whenever possible.
Related Commands
Calculates the inverse hyperbolic tangent of a value.
tanhֿ¹(value)
The tanhֿ¹( command is only found in the catalog. Press:
 2nd CATALOG to access the command catalog.
 T to skip to commands starting with T.
 Scroll down and select tanhֿ¹(
TI83/84/+/SE
1 byte
The tanhֿ¹( command calculates the inverse hyperbolic tangent of a value. tanhֿ¹(x) is the number y such that x = tanh(y).
tanhֿ¹(x), although it can be defined for all real and complex numbers, is realvalued only for x in the open interval (1,1). Since Z80 calculators have their hyperbolic functions and inverses restricted to real values, ERR:DOMAIN is thrown when x is outside the interval (1,1).
The tanhֿ¹( command also works for lists.
tanhֿ¹(0)
0
tanhֿ¹({.5,.5})
{.5493061443 .5493061443}
Error Conditions
 ERR:DOMAIN when taking the inverse tanh of a number not between 1 and 1.
Related Commands
Calculates the inverse hyperbolic cosine of a value.
coshֿ¹(value)
The coshֿ¹( command can only be found in the catalog. Press:
 2nd CATALOG to access the command catalog.
 C to skip to commands starting with C.
 Scroll down and select coshֿ¹(
TI83/84/+/SE
1 byte
The coshֿ¹( function gives the inverse hyperbolic cosine of a value. coshֿ¹(x) is the number y such that x = cosh(y).
Although coshֿ¹(x) can be defined for all real and complex numbers, it assumes real values only for x≥1. Since hyperbolic functions in the Z80 calculators are restricted only to real values, ERR:DOMAIN is thrown when x<1.
The coshֿ¹( command also works for lists.
coshֿ¹(1)
0
coshֿ¹({2,3})
{1.316957897 1.762747174}
Error Conditions
 ERR:DOMAIN when taking the inverse cosh of a number less than 1.
Related Commands
Calculates the inverse hyperbolic sine of a value.
sinhֿ¹(value)
The sinhֿ¹( command is only found in the catalog. Press:
 2nd CATALOG to access the command catalog.
 S to skip to commands starting with S.
 Scroll down and select sinhֿ¹(
TI83/84/+/SE
1 byte
The sinhֿ¹( command calculates the inverse hyperbolic sine of a value. sinhֿ¹(x) is the number y such that x = sinh(y). Unlike for the standard trig functions, this uniquely determines the inverse hyperbolic sine of any real number.
The sinhֿ¹( command also works for lists.
sinhֿ¹(0)
0
sinhֿ¹({1,2,3})
{.881373587 1.443635475 1.818446459}
Related Commands
Formats a complex value in rectangular form when displaying it.
value►Rect
Press:
 MATH to access the math menu.
 RIGHT RIGHT to access the CPX submenu.
 6 to select ►Rect, or use arrows and ENTER.
TI83/84/+/SE
2 bytes
The ►Rect command can be used when displaying a complex number on the home screen, or with the Disp and Pause commands. It will then format the number as though a+bi mode were enabled, even when it's not. It also works with lists.
i►Polar
1e^(1.570796327i)
Ans►Rect
i
It will also work when displaying a number by putting it on the last line of a program by itself. It does not work with Output(, Text(, or any other more complicated display commands.
To actually separate a number into the components of rectangular form, use real( and imag(.
Error Conditions
 ERR:SYNTAX is thrown if the command is used somewhere other than the allowed display commands.
 ERR:DATA TYPE is thrown if the value is real.
Related Commands
Formats a complex value in polar form when displaying it.
value►Polar
Press:
 MATH to access the math menu.
 RIGHT RIGHT to access the CPX submenu.
 7 to select ►Polar, or use arrows and ENTER.
TI83/84/+/SE
2 bytes
The ►Polar command can be used when displaying a complex number on the home screen, or with the Disp and Pause commands. It will then format the number as though re^θi mode were enabled. It also works with lists.
i
i
i►Polar
1e^(1.570796327i)
{1,i}►Polar
{1 1e^(1.570796327i)}
It will also work when displaying a number by putting it on the last line of a program by itself. It does not work with Output(, Text(, or any other more complicated display commands.
To actually separate a number into the components of polar form, use abs( and angle(.
Error Conditions
 ERR:SYNTAX is thrown if the command is used somewhere other than the allowed display commands.
 ERR:DATA TYPE is thrown if the value is real.
Related Commands
Calculates the hyperbolic tangent of a value.
tanh(value)
The tanh( command is only found in the Catalog. Press:
 2nd CATALOG to access the command catalog.
 T to skip to commands starting with T.
 Scroll down and select tanh(.
TI83/84/+/SE
1 byte
Calculates the hyperbolic tangent of a value. The hyperbolic trig functions sinh(, cosh(, and tanh( are an analog of normal trig functions, but for a hyperbola, rather than a circle. They can be expressed in terms of real powers of e, and don't depend on the Degree or Radian mode setting.
tanh(0)
0
tanh(1)
.761594156
Like normal trig commands, tanh( works on lists as well, but not on complex numbers, even though the function is often extended to the complex numbers in mathematics.
Advanced Uses
The tanh( command can be used to approximate the sign function:
(1)As the absolute value of the input becomes large, the convergence is achieved at a point closer to zero. For the function to work as intended generally, numbers having lesser orders of magnitude need to be multiplied by a factor large enough for the argument to arrive at ±16.720082053122, which is the smallest input to produce ±1 (respectively) to fourteen digits of accuracy.
5/12→X
.4166666667
tanh(E9X)
1
tanh(E9X)
1
Formulas
The definition of the hyperbolic tangent is:
(2)Related Commands
Calculates the hyperbolic cosine of a value.
cosh(value)
The cosh( command is only found in the Catalog. Press:
 2nd CATALOG to access the command catalog.
 C to skip to commands starting with C.
 Scroll down and select cosh(.
TI83/84/+/SE
1 byte
Calculates the hyperbolic cosine of a value. The hyperbolic trig functions sinh(, cosh(, and tanh( are an analog of normal trig functions, but for a hyperbola, rather than a circle. They can be expressed in terms of real powers of e, and don't depend on the Degree or Radian mode setting.
cosh(0)
1
cosh(1)
1.543080635
Like normal trig commands, cosh( works on lists as well, but not on complex numbers, even though the function is often extended to the complex numbers in mathematics.
Formulas
The definition of hyperbolic cosine is:
(1)Related Commands
Calculates the hyperbolic sine of a value.
sinh(value)
The sinh( command is only found in the Catalog. Press:
 2nd CATALOG to access the command catalog.
 S to skip to commands starting with S.
 Scroll down and select sinh(.
TI83/84/+/SE
1 byte
Calculates the hyperbolic sine of a value. The hyperbolic trig functions sinh(, cosh(, and tanh( are an analog of normal trig functions, but for a hyperbola, rather than a circle. They can be expressed in terms of real powers of e, and don't depend on the Degree or Radian mode setting.
sinh(0)
0
sinh(1)
1.175201194
Like normal trig commands, sinh( works on lists as well, but not on complex numbers, even though the function is often extended to the complex numbers in mathematics.
Formulas
The definition of hyperbolic sine is:
(1)Related Commands
Returns the inverse tangent (also called arctangent)
tanֿ¹(number)
Press:
 [2nd]
 [tanֿ¹]
TI83/84/+/SE
1 byte
tanֿ¹( returns the arctangent of its argument. It is the inverse of tan(, which means that tanֿ¹(n) produces an angle θ such that tan(θ)=n.
Like tan(, the result of tanֿ¹( depends on whether the calculator is in Radian or Degree mode. However, unlike tangent, the result is in degrees or radians, not the argument. A full rotation around a circle is 2π radians, which is equal to 360°. The conversion of θ=tanֿ¹(n) from radians to degrees is θ*180/π and from degrees to radians is θ*π/180. The tanֿ¹( command also works on a list.
tanֿ¹( will always return a value between π/2 and π/2 (or 90° and 90°).
In radians:
:tanֿ¹(1)
.7853981634
In degrees:
:tanֿ¹(1)
45
Optimization
Expressions of the form tanֿ¹(y/x) are usually better recast as R►Pθ(x,y); the latter will not fail even if x should happen to be equal to zero.
Error Conditions
 ERR:DATA TYPE is thrown if you input a complex value or a matrix.
Related Commands
Flips the truth value of its argument.
not(value)
Press:
 2nd TEST to access the test menu.
 RIGHT to access the LOGIC submenu.
 4 to select not(, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The last logical operator available on the 83 series takes only one value as input. not( comes with its own parentheses to make up for this loss. Quite simply, it negates the input: False becomes True (1) and True returns False (0). not( can be nested; one use is to make any True value into a 1.
:not(0)
1
:not(20 and 14)
0
:not(not(2))
1
Advanced Uses
not(not(X)) will make any value X into 1 if it's not 0, and will keep it 0 if it is.
Optimization
not(X) and X=0 have the same truth value, but not( is shorter if the closing parenthesis is omitted:
:If A=0
can be
:If not(A
Related Commands
Returns the truth value of value1 or value2, but not both, being true.
value1 xor value2
Press:
 2nd TEST to access the test menu.
 RIGHT to access the LOGIC submenu.
 3 to select xor, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The third and final binary operator is a little trickier, but it has the coolest name. xor takes two numbers of expressions and checks to see if exactly one is True. If both are True or both are False, it returns 0.
1 xor 0
1
:2 xor (3 xor 0) (after evaluating 3 xor 0, it simplifies into True xor True.)
0
:0 xor (11)^2
0
Table of Results
For reference, the following true/false table shows what gets returned when you use different combinations of 1 (true) and 0 (false):
xor  1 (true)  0 (false) 

1 (true)  0 (false)  1 (true) 
0 (false)  1 (true)  0 (false) 
Related Commands
Returns the truth value of value1 or value2 being true.
value1 or value2
Press:
 2nd TEST to access the test menu.
 RIGHT to access the LOGIC submenu.
 2 to select or, or use arrows and ENTER.
TI83/84/+/SE
1 byte
or takes two numbers or expressions, and checks to see if either one is True. If both are False, it returns 0. If at least one is True, it returns 1. or is commutative (i.e. the order of arguments does not matter). As with and, you can use variables and expressions, and use multiple or's together.
:0 or 11
0
:0 or 1
1
:2 or 6*4
1
:0 or 1 or 0
1
Related Commands
Returns the logical value of value1 and value2 being true.
value1 and value2
Press:
 2nd TEST to access the test menu.
 RIGHT to access the LOGIC submenu.
 ENTER to select and.
TI83/84/+/SE/CSE/CE
1 byte
and takes two numbers, variables, or expressions and tests to see if they are both True (not equal to 0). If they are, it returns 1. If either input is False (0), it returns 0. Note that the order of the operators doesn't matter (i.e. and is commutative), and that multiple and's can be used together
:0 and 0
0
:0 and 1
0
:1 and 2 (2 counts as True, just like one)
1
:1→X
:X and 2+2 (you can use variables and expressions)
1
:1 and 1 and 22 (the last input evaluates to 0, or false)
0
Optimization
Multiplying two values has the same truth value as and; thus, and can sometimes be replaced by multiplication. Because the calculator does implicit multiplication, meaning it automatically recognises when you want to multiply, you don't need to use the * sign.
:If A and B
can be
:If AB
However, do not use this optimization if A and B might be expected to take on large values, as an overflow error might occur.
Related Commands
The term "radian" is ambiguous and may refer to:
 ^{r} (the radian symbol), used for converting an angle to radians.
 Radian, the mode command for making radian angle measures the default.
If an internal link led you here, you may wish to change the link to point directly to the intended article.
The term "degree" is ambiguous and may refer to:
 ° (the degree symbol), used to convert an angle to degrees.
 Degree, the mode command used to switch to degree mode.
If an internal link led you here, you may wish to change the link to point directly to the intended article.
The term "" is ambiguous and may refer to:
If an internal link led you here, you may wish to change the link to point directly to the intended article.
If the calculator is in degree mode, the ^{r} (radian) symbol converts a radian angle to degrees.
angle^{r}
Press:
 2nd ANGLE to access the angle menu.
 3 to select ^{r}, or use arrows and ENTER.
TI83/84/+/SE
1 byte
NOTE: Due to the limitations of the wiki markup language, the ^{r} command on this page does not appear as it would on the calculator. See Wiki Markup Limitations for more information.
Normally, when the calculator is in degree mode, the trigonometric functions only return values calculated in degrees. With the ^{r} symbol you can have the angle evaluated as if in radian mode because it converts the angle into degrees.
One full rotation around a circle is 2π radians, which is equal to 360°. To convert an angle in radians to degrees you multiply by 180/π, and to convert from degrees to radians multiply by π/180.
In degree mode:
sin(π) \\sine of Pi degrees
.0548036651
sin(π^^r)
0
In radian mode:
sin(π)
0
sin(π^^r)
0 \\There's no difference when in radians
Optimization
When you only call the trig function once in a program and want it calculated in radians, instead of changing the mode you can just use ° to save onebyte (the newline from using the command Radian)
:Radian
:sin(X)
can be
:sin(X^^r)
Related Commands
 ° (degree symbol)
The term "real" is ambiguous and may refer to:
 real(, the complex number command returning the real part of a number.
 Real, the mode command that selects Real number mode.
If an internal link led you here, you may wish to change the link to point directly to the intended article.
The TI83 series of calculators has many options to select from that influence either the effect of commands or the way numbers or graphs are displayed. Outside a program, these can be changed by accessing the Mode, Format, or TblSet screens (shown above), and selecting the correct options. When editing a program, going to these screens and choosing an option will instead paste a command that sets that option for you.
These commands are given below, divided by the screen where it is found:
Mode Settings (MODE)
 Normal, Sci, and Eng determine how large numbers are displayed.
 Float and Fix determine how decimals are displayed.
 Radian and Degree determine which form of angle measurement is used.
 Func, Param, Polar, and Seq determine the graphing mode.
 Connected and Dot determine the default graphing style.
 Sequential and Simul determine how multiple equations are graphed.
 Real, a+bi, and re^θi determine how complex numbers are displayed (and affects ERR:NONREAL ANS)
 Full, Horiz, and GT determine how and if the screen is split.
Graph Format Settings (2nd FORMAT)
 RectGC and PolarGC determine how coordinates of the cursor are displayed and stored.
 CoordOn and CoordOff determine whether the coordinates of the cursor are displayed at all.
 GridOn and GridOff determine whether the grid is displayed.
 AxesOn and AxesOff determine whether the X and Y axes are displayed.
 LabelOn and LabelOff determine whether the X and Y axes are labeled (if they are displayed)
 ExprOn and ExprOff determine whether the equation graphed or traced is displayed.
 Time, Web, uvAxes, uwAxes, and vwAxes (visible in Seq mode) determine the way sequences are graphed, the default being Time.
Table Settings (2nd TBLSET)
 IndpntAuto and IndpntAsk determine whether values of the independent variable in the table are calculated automatically.
 DependAuto and DependAsk determine whether the values in the table are calculated automatically for all equations.
Miscellaneous Settings (2nd CATALOG)
 DiagnosticOn and DiagnosticOff determine whether the statistics r and/or r^{2} are displayed by regressions.
 FnOn and FnOff determine whether equations are graphed.
 PlotsOn and PlotsOff determine whether plots are graphed.
 Pmt_Bgn and Pmt_End determine whether payments are done at the beginning or end of a period with the finance solver.
Using these settings in a program
A fair amount of these settings are important to programmers because, if set to the wrong value, they can easily mess up the program. At the beginning of the program, therefore, it's a good idea to set these settings to the correct value. At the very minimum, programs that use the graph screen should set AxesOff if necessary, since AxesOn is the default and a very common setting. This is a part of program setup.
However, another important consideration is that it's somewhat rude to change the user's settings without permission, so your program should change as little as possible. How to reconcile these diametrically opposite goals? There are several ways that work for different settings:
Use GDBs (Graph DataBases)
The graph screen settings can be backed up in (and retrieved from) a GDB file by the StoreGDB and RecallGDB commands. If you store to a GDB at the beginning of the program, and recall from it at the end, you will have preserved all settings that deal with the graph screen.
Change math settings implicitly
Instead of changing settings like the Degree/Radian or the Real/a+bi setting, you can use certain commands that will force calculations to be done with that setting regardless of the mode. For example, you can use the degree symbol or radian symbol to make ambiguous calculations like sin(30) into unambiguous ones like sin(30^{o}). Similarly, by adding 0i to a number, you force it to be complex, so that calculations done with it will never cause an ERR:NONREAL ANS (even if you're in Real mode).
Ignore uncommon settings
You might ignore settings that are too uncommon to matter. For example, setting the Full command is unnecessary, because very few people would ever use a split screen, and people that do probably will also figure out why your program breaks when they do so.
Be rude when you must
For something like Float, there's no way to avoid changing the user's settings in a way you can't restore. If you have to change a setting so your program works, do it, and mention the issue in the readme. If you changed a setting to an uncommon value, change it back to "Float" (in general, to the default value) when you're done.
Adds a multiple of one row of a matrix to another.
*row+(factor,matrix,row1,row2)
Press:
 MATRX (on a TI83) or 2nd MATRX (TI83+ or higher) to access the matrix menu.
 RIGHT to access the MATH submenu.
 ALPHA F to select *row+(, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The *row+( adds a multiple of one row to another row and returns the result. It is an elementary row operation used in Gaussian Elimination.
[[1,2][3,4]]
[[1 2]
[3 4]]
*row+(10,Ans,1,2)
[[3 4 ]
[31 42]]
Advanced Uses
You can add columns instead of rows with the aid of the ^{T} (transpose) command.
Error Conditions
 ERR:INVALID DIM is thrown if one of the row arguments isn't a valid row (larger than the matrix size, or otherwise bad)
Related Commands
Multiplies a row by a scalar.
*row(factor,matrix,row)
Press:
 MATRX (on a TI83) or 2nd MATRX (TI83+ or higher) to access the matrix menu.
 RIGHT to access the MATH submenu.
 ALPHA E to select *row(, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The *row( command multiplies a row of a matrix by a scalar factor and returns the result. It is an elementary row operation used in Gaussian Elimination.
[[1,2][3,4]]
[[1 2]
[3 4]]
*row(10,Ans,1)
[[10 20]
[3 4 ]]
Advanced Uses
You can multiply columns instead of rows with the aid of the ^{T} (transpose) command.
Error Conditions
 ERR:INVALID DIM is thrown if the row argument isn't a valid row (is larger than the size of the matrix, or otherwise bad)
Related Commands
Adds one row of a matrix to another.
row+(matrix,row1,row2)
Press:
 MATRX (on a TI83) or 2nd MATRX (TI83+ or higher) to access the matrix menu.
 RIGHT to access the MATH submenu.
 ALPHA D to select row+(, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The row+( command adds one row of a matrix to the second, and returns the result. It is an elementary row operation used in Gaussian Elimination.
[[1,2][3,4]]
[[1 2]
[3 4]]
row+(Ans,1,2)
[[1 2]
[4 6]]
Advanced Uses
You can add columns instead of rows with the aid of the ^{T} (transpose) command.
Error Conditions
 ERR:INVALID DIM is thrown if one of the row arguments isn't a valid row (larger than the matrix size, or otherwise bad)
Related Commands
Swaps two rows of a matrix.
rowSwap(matrix,row1,row2)
Press:
 MATRX (on a TI83) or 2nd MATRX (TI83+ or higher) to access the matrix menu.
 RIGHT to access the MATH submenu.
 ALPHA C to select rowSwap(, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The rowSwap( command swaps two rows of a matrix and returns the result. It is an elementary row operation used in Gaussian Elimination.
[[1,2][3,4]]
[[1 2]
[3 4]]
rowSwap(Ans,1,2)
[[3 4]
[1 2]]
Advanced Uses
You can swap columns instead of rows with the aid of the ^{T} (transpose) command.
Error Conditions
 ERR:INVALID DIM is thrown if one of the row arguments isn't a valid row (larger than the matrix size, or otherwise bad)
Related Commands
Recalls graph settings from a GDB (Graph DataBase) variable
RecallGDB number
Press:
 2nd DRAW to access the draw menu.
 LEFT to access the STO menu.
 4 to select RecallGDB, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The RecallGDB command recalls graph settings a GDB (Graph DataBase) variable, one of GDB1, GDB2, …, GDB0 (as indicated by the argument). These settings can be stored to a GDB using the StoreGDB command.
The settings stored in a GDB include:
 The graphing mode currently enabled.
 All equations in the current graphing mode, but NOT other graphing modes.
 All window variables applicable to the current graphing mode. This does not include zoom variables, table settings, or irrelevant variables such as Tmin when in function mode.
 The menu settings relevant to graphing (everything in the 2nd FORMAT menu, as well as Connected/Dot and Sequential/Simul settings in the MODE menu)
The number passed to RecallGDB must be one of 0 through 9. It has to be a number: RecallGDB X will not work, even if X contains a value 0 through 9.
Advanced Uses
The StoreGDB and RecallGDB variables are useful in cleaning up after a program finishes running, preserving the user's settings. If your program heavily relies on the graph screen, it may end up editing window size or other graph settings, which the user might want to be saved. This is easily done:
Add StoreGDB 1 (or any other number) to the beginning of your program.
Then, feel free to edit any graph settings you like.
At the end of your program, add RecallGDB 1, followed by DelVar GDB1, to recall the graph settings stored at the beginning.
GDBs can also be useful in adding extra string storage. You can store strings to the Yn variables, and back them up in a GDB; to retrieve them later, recall the GDB and use Equ►String( to store the equations to the strings again.
Error Conditions
 ERR:DATA TYPE is thrown if the argument is not a number 0 through 9.
 ERR:UNDEFINED is thrown if the requested GDB does not exist.
Related Commands
See Also
Solves for the complex roots of a quadratic equation.
A, B, C  the constants in Ax^{2}+Bx+C=0
Ans  a 2element list of the two roots (or the one repeated root)
A, B, C
TI83/84/+/SE
thornahawk
URL: [http://tibasicdev.wikidot.com/localfiles/quadraticformula/Quad_Routines.zip]
2C/(B+{1,1}√(B²+4ACi²
For optimization purposes, an alternate form of the quadratic formula is used (see below for the formulas). The {1,1} list is used to replace the ± symbol — lists can be used just as well as numbers in expressions, making the result a list as well. By using i² in the expression in place of subtraction, the routine avoids having to activate a+bi mode to allow complex roots.
The output is a complex list in Ans of the two roots. If there is only one root, it will be returned twice. If both roots are real, they will still be returned correctly, but stored internally as complex numbers — so use the real( command on them if you want to pass them to commands that don't accept complex arguments.
Advanced
The ordinary formula above can give poor results if B is much larger than A and/or C. In that case, an alternate routine can be used:
√(B²+4ACi²
If 0>real(Ansconj(B
Ans
.5(B+Ans
{Ans/A,C/Ans
Formulas
The ordinary quadratic formula, and its alternate form are used:
(1)Performs a chisquare goodnessoffit test, to determine if an observation fits a distribution.
The TI84+ and TI84+ SE have a command, χ²GOFTest(, that does the same thing.
L₁  observed counts of the outcomes
L₂  expected counts of their outcomes, or their distribution
X  the χ² statistic for the data.
F  the df (degrees of freedom) statistic.
P  the probability value of the test.
L₁, L₂, X, F, P
TI83/84/+/SE
:L₂sum(L₁)/sum(L₂→L₂
:sum((L₁L₂)²/L₂→X
:dim(L₁)1→F
:χ²cdf(X,E99,F→P
This routine tests the null hypothesis that the variation between the observed and expected distributions is due to random chance alone. The value of P is the probability that such variation would occur, assuming the null hypothesis. You would reject this null hypothesis if this value is too low, and conclude that the variable you're measuring doesn't vary according to the expected distribution.
First, we must normalize L₂, the expected distribution, to have the same sum as L₁. We do this by multiplying by the sum of L₁, and dividing by the original sum of L₂. You can omit this line if L₂ already has the same sum, or optimize it to L₂sum(L₁→L₂ if it's a probability distribution (and hence has a sum of 1).
Then, we calculate the χ² statistic (according to the formula given at the bottom of the page). The number of degrees of freedom is just defined to be one less than the number of outcomes. Then, we calculate the probability that χ² would have a value this high by chance alone, by using the χ²cdf( command to calculate the probability mass between this value and infinity (we can't actually put in infinity, but we use the value E99, which is close enough for our purposes — the error introduced by this is too small for the calculator to evaluate).
An example: suppose you want to test if your sixsided die is fair. You threw the die 60 times, and recorded the results: a 1 came up 13 times, a 2 came up 10 times, a 3 came up 6 times, a 4 came up 9 times, a 5 came up 8 times, and a 6 came up 14 times. This is the observed frequency. The expected frequency is that the results would be even: each side would come up 10 times. Therefore, we set L₁ to {13,10,6,9,8,14} and L₂ to {10,10,10,10,10,10}.
The output is the following:
χ²=4.6
p=.4666162743
df=5
Because the value of p is high, it's perfectly plausible that the null hypothesis is true: p>0.05, so the data is not significant on a 5% level. We don't have enough evidence to reject the null hypothesis, so we conclude that the die is fair.
Formulas
The formula for calculating the χ² statistic: (O_{i} is the observed count of the ith outcome, and E_{i} is the expected count)
(1)Error Conditions
 ERR:DIM MISMATCH is thrown if the two lists' sizes aren't the same.
 ERR:DOMAIN is thrown if the lists have only one element.
P►Rx( calculates the xvalue (in Cartesian coordinates) given Polar coordinates.
P►Rx(r,θ)
Press:
 2nd ANGLE to access the angle menu.
 7 to select P►Rx(, or use arrows and ENTER.
TI83/84/+/SE/CE
1 byte
P►Rx( (polar►rectangular xcoordinate) calculates the xcoordinate of a polar point. Polar coordinates are of the form (r,θ), where θ is the counterclockwise angle made with the positive xaxis, and r is the distance away from the origin (the point (0,0)). The conversion identity x=r*cos(θ) is used to calculate P►Rx(.
The value returned depends on whether the calculator is in radian or degree mode. A full rotation around a circle is 2π radians, which is equal to 360°. The conversion from radians to degrees is angle*180/π and from degrees to radians is angle*π/180. The P►Rx( command also accepts a list of points.
P►Rx(5,π/4)
3.535533906
5*cos(π/4)
3.535533906
P►Rx({1,2},{π/4,π/3})
{.7071067812 1}
Advanced Uses
You can bypass the mode setting by using the ° (degree) and ^{r} (radian) symbols. This next command will return the same values no matter if your calculator is in degrees or radians:
P►Rx(1,{π/4^^r,60°})
{.7071067812 .5}
Optimization
In most cases P►Rx(r,θ) can be replaced by r*cos(θ) to save a byte:
:P►Rx(5,π/12)
can be
:5cos(π/12)
Conversely, complicated expressions multiplied by a cosine factor can be simplified by using P►Rx(r,θ) instead.
:(A+BX)cos(π/5)
can be
:P►Rx(A+BX,π/5)
Error Conditions
 ERR:DIM MISMATCH is thrown if two list arguments have different dimensions.
 ERR:DATA TYPE is thrown if you input a complex argument.
Related Commands
Polar is a graphing mode on TI83 series calculators.
It may also refer to:
 Polar, the mode command that enables Polar graphing mode.
 ►Polar, the format command that displays complex numbers in polar form.
 PolarGC, the mode command to store graph coordinates as (R,θ).
If an internal link led you here, you may wish to change the link to point directly to the intended article.
Although the wiki markup language provides a rich set of features and functionality for designing and laying out a page, one major limitation that it has is it does not allow formatting inside a link or code block. Specifically, you cannot display text or numbers as superscript (text is smaller and displayed at the top of the line) or subscript (text is smaller and displayed at the bottom of the line) respectively.
These particular command pages are the primary pages that this limitation impacts, and subsequently the commands are not able to be displayed like they would be on the calculator. Any page containing one or more of these commands will have a disclaimer, and links to more information on the individual commands affected.
Here is a listing of each command affected, along with how it will appear in this wiki, the command's proper name, and how to access it on a calculator:
^^r
 Radian Symbol
 Appears as ^{r} on a calculator
 To type, press:
 [2nd]
 [Angle]
 [2] or use arrows to select ^{r}
T
 Transpose
 Appears as ^{T} on a calculator
 To type, press:
 [2nd]
 [Matrix]
 [Right] to access MATH submenu
 [2] or use arrow keys to select ^{T}
E
 Base 10 exponent symbol
 Appears as E on a calculator
 To type, press:
 [2nd]
 [EE]
Related Pages
If the calculator is in radian mode, the ° (degree) symbol converts an angle to radians.
angle°
Press:
 [2nd]
 [Angle]
 [Enter] or [1]
TI83/84/+/SE
1 byte
Normally, when the calculator is in radian mode, the trigonometric functions only return values calculated in radians. With the ° symbol you can have the angle evaluated as if in degree mode because it converts the angle into radians.
One full rotation around a circle is 2π radians, which is equal to 360°. To convert an angle in radians to degrees you multiply by 180/π, and to convert from degrees to radians multiply by π/180.
In radian mode:
sin(45) \\ actually calculating sin(2578.31)
.8509035245
sin(45°)
.7071067812
In degree mode:
sin(45)
.7071067812
sin(45°)
.7071067812 \\ There's no difference when in degrees
Optimization
When you only call the trig function once in a program and want it calculated in degrees, instead of changing the mode you can just use ° to save onebyte (the newline from using the command Degree)
:Degree
:sin(X)
can be
:sin(X°)
Related Commands
 ^{r} (radian symbol)
Returns the inverse cosine (also called arccosine)
cosֿ¹(number)
Press:
 [2nd]
 [cosֿ¹]
TI83/84/+/SE
1 byte
cosֿ¹( returns the arccosine of its argument. It is the inverse of cos(, which means that cosֿ¹(n) produces an angle θ such that cos(θ)=n.
Like cos(, the result of cosֿ¹( depends on whether the calculator is in Radian or Degree mode. However, unlike cosine, the result is in degrees or radians, not the argument. A full rotation around a circle is 2π radians, which is equal to 360°. The conversion of θ=cosֿ¹(n) from radians to degrees is θ*180/π and from degrees to radians is θ*π/180. The cosֿ¹( command also works on a list.
The cosֿ¹( function can be defined for all real and complex numbers, but assumes real values only in the closed interval [1,1]. Because Z80 calculators have their trigonometric functions and inverses restricted only to real values, the calculator will throw ERR:DOMAIN if the argument is outside of this interval, no matter what the mode setting may be.
In radians:
:cosֿ¹(1)
3.141592654
In degrees:
:cosֿ¹(1)
180
Advanced Uses
Since the function cosine itself doesn't have the restrictions that arccosine does, and since arccosine is the inverse of cosine, you can use cosֿ¹(cos( to keep a variable within a certain range (most useful for the home screen). Here is an example for a game like pong. The ball travels between 0 and 12.
You could use a flag like this:
:If X=12 or not(X \\ X is the position
:D→D \\ D is the direction
:X+D→X \\ new position
:Output(8,X,"=
An easier way to do this, without needing a flag or even an If statement, is using cosֿ¹(cos(
:X+1→X \\ Note: the calculator is in Degree mode
:Output(8,cosֿ¹(cos(15X))/15,"=") \\ I used 15 because cosֿ¹ ranges from [0,180]
and X from [0,12], so 180/12=15
Error Conditions
 ERR:DOMAIN is thrown if you supplied an argument outside the interval [1,1]
 ERR:DATA TYPE is thrown if you input a complex value or a matrix.
Related Commands
Returns the inverse sine (also called arcsine)
sinֿ¹(number)
Press:
 [2nd]
 [sinֿ¹]
TI83/84/+/SE
1 byte
sinֿ¹( returns the arcsine of its argument. It is the inverse of sin(, which means that sinֿ¹(z) produces an angle θ such that sin(θ)=z.
Like sin(, the result of sinֿ¹( depends on whether the calculator is in Radian or Degree mode. However, unlike sine, the result is in degrees or radians, not the argument. A full rotation around a circle is 2π radians, which is equal to 360°. The conversion of θ=sinֿ¹(n) from radians to degrees is θ*180/π and from degrees to radians is θ*π/180. The sinֿ¹( command also works on lists.
The sinֿ¹( function can be defined for all real and complex numbers; however, the function assumes real values only in the closed interval [1,1]. Because the trigonometric functions and their inverses in the Z80 calculators are restricted only to real values, the calculator will throw ERR:DOMAIN if the argument is outside of this interval, no matter what the mode setting may be.
In radians:
:sinֿ¹(1)
1.570796327
In degrees:
:sinֿ¹(1)
90
Advanced Uses
Since the function sine itself doesn't have the restrictions that arcsine does, and since arcsine is the inverse of sine, you can use sinֿ¹(sin( to keep a variable within a certain range (most useful on the graph screen). Here is an example for a game like pong. The ball travels between 6 and 6.
You could use a flag like this:
:If 6=abs(X \\ X is the position
:D→D \\ D is the direction
:X+D→X \\ new position
:PtOn(54,X,"=")
An easier way to do this, without needing a flag or even an If statement, is using sinֿ¹(sin(
:X+1→X \\ Note: the calculator is in degree mode
:PtOn(54,sinֿ¹(sin(15X))/15,"=") \\ 15 is used because sinֿ¹ ranges from [90,90]
and X from [6,6], so 90/6=15
Error Conditions
 ERR:DATA TYPE is thrown if you input a complex value or a matrix.
 ERR:DOMAIN is thrown if you supplied an argument outside the interval [1,1]
Related Commands
tan(θ) calculates the tangent of the angle θ, which is defined by $\tan \theta=\frac{\sin \theta}{\cos \theta}$
The value returned depends on whether the calculator is in Radian or Degree mode. A full rotation around a circle is 2π radians, which is equal to 360°. The conversion from radians to degrees is angle*180/π and from degrees to radians is angle*π/180. The tan( command also works on a list of real numbers.
Since tangent is defined as the quotient of sine divided by cosine, it is undefined for any angle such that cos(θ)=0.
In radians:
tan(π/4)
1
In degrees:
tan(45)
1
Advanced Uses
You can bypass the mode setting by using the ° (degree) and ^{r} (radian) symbols. These next two commands will return the same values no matter if your calculator is in degrees or radians:
tan(45°)
1
tan(π/4¹ )
1
Error Conditions
 ERR:DATA TYPE is thrown if you supply a matrix or a complex argument.
 ERR:DOMAIN is thrown if you supply an angle of π/2±nπ (in radians, where n is an integer) or 90±180n (in degrees, where n is an integer), or when the input is ≥1E12.
Related Commands
cos(θ) returns the cosine of θ, which is defined as the xvalue of the point of intersection of the unit circle and a line containing the origin that makes an angle θ with the positive xaxis
The value returned depends on whether the calculator is in Radian or Degree mode. A full rotation around a circle is 2π radians, which is equal to 360°. The conversion from radians to degrees is angle*180/π and from degrees to radians is angle*π/180. The cos( command also works on a list of real numbers.
In radians:
cos(π/3)
.5
In degrees:
cos(60)
.5
Advanced Uses
You can bypass the mode setting by using the ° (degree) and ^{r} (radian) symbols. These next two commands will return the same values no matter if your calculator is in degrees or radians:
cos(60°)
.5
cos(π/3ֿ¹ )
.5
Error Conditions
 ERR:DATA TYPE is thrown if you supply a matrix or a complex argument.
 ERR:ARGUMENT is thrown if you use more than one number.
 ERR:DOMAIN is thrown if you supply an input ≥1E12.
Related Commands
See Also
NOTE: Due to the limitations of the wiki markup language, the ^{r} command on this page does not appear as it would on the calculator. See Wiki Markup Limitations for more information.
sin(θ) returns the sine of θ, which is defined as the yvalue of the point of intersection of the unit circle and a line containing the origin that makes an angle θ with the positive xaxis
The value returned depends on whether the calculator is in Radian or Degree mode. A full rotation around a circle is 2π radians, which is equal to 360°. The conversion from radians to degrees is angle*180/π and from degrees to radians is angle*π/180. The sin( command also works on a list of real numbers.
In radians:
sin(π/6)
.5
In degrees:
sin(30)
.5
Advanced Uses
You can bypass the mode setting by using the ° (degree) and ^{r} (radian) symbols. These next two commands will return the same values no matter if your calculator is in degrees or radians:
sin(30°)
.5
sin(π/6ֿ¹)
.5
Error Conditions
 ERR:DATA TYPE is thrown if you supply a matrix or a complex argument.
 ERR:DOMAIN is thrown if you supply an input ≥1E12.
Related Commands
See Also
Stores graph setting to a GDB (Graph DataBase) to be recalled later with RecallGDB.
StoreGDB GDB#
StoreGDB number
Press:
 2nd DRAW to access the draw menu.
 LEFT to access the STO menu.
 3 to select StoreGDB, or use arrows and ENTER.
TI83/84/+/SE/CSE/CE
1 byte
The StoreGDB command stores all graph settings needed to reconstruct the current graph to a GDB (Graph DataBase) variable, one of GDB1, GDB2, …, GDB0 (as indicated by the argument). These settings can then be recalled using the RecallGDB command.
The settings stored in a GDB include:
 The graphing mode currently enabled.
 All equations in the current graphing mode, but NOT other graphing modes.
 All window variables applicable to the current graphing mode. This does not include zoom variables, table settings, or irrelevant variables such as Tmin when in function mode.
 The menu settings relevant to graphing (everything in the 2nd FORMAT menu, as well as Connected/Dot and Sequential/Simul settings in the MODE menu)
The number passed to StoreGDB must be one of 0 through 9. It has to be a number: StoreGDB X will not work, even if X contains a value 0 through 9.
Advanced Uses
The StoreGDB and RecallGDB variables are useful in cleaning up after a program finishes running, preserving the user's settings. If your program heavily relies on the graph screen, it may end up editing window size or other graph settings, which the user might want to be saved. This is easily done:
Add StoreGDB 1 (or any other number) to the beginning of your program.
Then, feel free to edit any graph settings you like.
At the end of your program, add RecallGDB 1, followed by DelVar GDB1, to recall the graph settings stored at the beginning.
GDBs can also be useful in adding extra string storage. You can store strings to the Yn variables, and back them up in a GDB; to retrieve them later, recall the GDB and use Equ►String( to store the equations to the strings again.
Error Conditions
 ERR:DATA TYPE is thrown if the argument is not a number 0 through 9.
Related Commands
See Also
Stores the graph screen to a picture (one of Pic1, Pic2, …, Pic0)
StorePic number
Press:
 2nd DRAW to access the draw menu.
 LEFT to access the STO submenu.
 ENTER to select StorePic
TI83/84/+/SE
1 byte
StorePic saves the graph screen to a picture (to recall it later, use RecallPic). Every detail of the graph screen will be stored as it appears, with the sole exception of X and Y labels on the axes (if they are shown).
The number passed to StorePic must be one of 0 through 9. It has to be a number: StorePic X will not work, even if X contains a value 0 through 9.
Advanced Uses
A combination of StorePic and RecallPic can be used to maintain a background over which another sprite moves:
First, draw the background, and save it to a picture file with StorePic.
Next, draw the sprite to the screen.
When you want to move the sprite, erase it, then use RecallPic to draw the background again.
Then draw the sprite to its new location on the screen again (this can be done before or after using RecallPic).
Also, if a screen in your program takes more than a second to draw, and is displayed several times, you might want to consider storing it to a picture the first time it's drawn, and then recalling it every next time you want to draw it.
Error Conditions
 ERR:DATA TYPE is thrown if the argument is not a number 0 through 9.
Related Commands
Recalls a saved picture (one of Pic1, Pic2, …, Pic0) to the graph screen.
RecallPic number
Press:
 2nd DRAW to access the draw menu.
 LEFT to access the STO submenu.
 2 to select RecallPic, or use arrows and ENTER.
TI83/84/+/SE
1 byte
RecallPic draws a saved picture to the graph screen (to save a picture, draw it on the graph screen, then save it with StorePic). If something is already drawn on the graph screen, RecallPic will draw new pixels where needed, but it will not erase anything. As a result, you often want to ClrDraw before recalling a picture.
The number passed to RecallPic must be one of 0 through 9. It has to be a number: RecallPic X will not work, even if X contains a value 0 through 9.
Advanced Uses
A combination of StorePic and RecallPic can be used to maintain a background over which another sprite moves:
 Draw the background, and save it to a picture file with StorePic.
 Next, draw the sprite to the screen.
 When you want to move the sprite, erase it, then use RecallPic to draw the background again.
 Then draw the sprite to its new location on the screen again (this can be done before or after using RecallPic).
Also, if a screen in your program takes more than a second to draw, and is displayed several times, you might want to consider storing it to a picture the first time it's drawn, and then recalling it every next time you want to draw it.
Error Conditions
 ERR:DATA TYPE is thrown if the argument is not a number 0 through 9.
 ERR:UNDEFINED is thrown if the requested picture does not exist.
Related Commands
Puts a matrix into reduced rowechelon form.
rref(matrix)
Press:
 MATRX (on the TI83) or 2nd MATRX (TI83+ or higher) to access the matrix menu.
 RIGHT to access the math menu.
 ALPHA B to select rref(, or use arrows and ENTER.
TI83/84/+/SE
2 bytes
Given a matrix with at least as many columns as rows, the rref( command puts a matrix into reduced rowechelon form using Gaussian elimination.
This means that as many columns of the result as possible will contain a pivot entry of 1, with all entries in the same column, or to the left of the pivot, being 0.
[[1,2,5,0][2,2,1,2][3,4,6,2]]
[[1 2 5 0]
[2 2 1 2]
[3 4 7 3]]
rref(Ans)
[[1 0 0 6 ]
[0 1 0 5.5]
[0 0 1 1 ]]
Advanced Uses
The rref( command can be used to solve a system of linear equations. First, take each equation, in the standard form of $a_1x_1+\dots + a_nx_n = b$, and put the coefficients into a row of the matrix.
Then, use rref( on the matrix. There are three possibilities now:
 If the system is solvable, the left part of the result will look like the identity matrix. Then, the final column of the matrix will contain the values of the variables.
 If the system is inconsistent, and has no solution, then it will end with rows that are all 0 except for the last entry.
 If the system has infinitely many solutions, it will end with rows that are all 0, including the last entry.
This process can be done by a program fairly easily. However, unless you're certain that the system will always have a unique solution, you should check that the result is in the correct form, before taking the values in the last column as your solution. The Matr►list( command can be used to store this column to a list.
Error Conditions
 ERR:INVALID DIM is thrown if the matrix has more rows than columns.
Related Commands
Puts a matrix into rowechelon form.
ref(matrix)
Press:
 MATRX (on the TI83) or 2nd MATRX (TI83+ or higher) to access the matrix menu.
 RIGHT to access the MATH submenu.
 ALPHA A to select ref(, or use arrows.
TI83/84/+/SE
2 bytes
Given a matrix with at least as many columns as it has rows, the ref( command uses a technique called Gaussian elimination to put the matrix into rowechelon form.
This means that the leftmost N columns (if the matrix has N rows) of the matrix are upper triangular  all entries below the main diagonal are zero. What's more, every entry on the main diagonal is either 0 or 1.
[[1,2,5,0][2,2,1,2][3,4,6,2]]
[[1 2 5 0]
[2 2 1 2]
[3 4 6 2]
ref(Ans)►Frac
[[1 4/3 2 2/3]
[0 1 9/2 1 ]
[0 0 0 0 ]]
Advanced Uses
In theory, a system of linear equations in N variables can be solved using the ref( command  an equation of the form $a_1x_1+\dots + a_nx_n = b$ becomes a row $a_1, \dots, a_n, b$, and is put into the matrix. If there is a sufficient number of conditions, the last row of the reduced matrix will give you the value of the last variable, and backsubstitution will give you the others.
In practice, it's easier to use rref( instead for the same purpose.
Error Conditions
 ERR:INVALID DIM is thrown if the matrix has more rows than columns.
Related Commands
Converts a string to a list of numbers.
Str1  The string you want to convert
L₁  The list that the numbers are stored to
L₁, A, Str1
TI83/84/+/SE
:1+seq(inString("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ ",sub(Str1,A,1)),A,1,length(Str1→L₁
With our characters stored in Str1, we loop through each character and store its position in our reference string (the uppercase alphabet) to the respective element of L₁.
This routine only allows for values from 1 to 26 in the list, since our string of characters is the uppercase alphabet, and each list value must match up to one of the string positions. If you add more characters to the string, however, you can increase the range of values in the list. This routine uses Str1, so you should clean it up at the end of your program.
Advanced Routine
Since a list element can store up to 14 digits, you can use int(, fPart(, and exponents to compress an additional 7 letters per element (2 digits for each letter), thus increasing your total number of characters to 6993.
" ABCDEFGHIJKLMNOPQRSTUVWXYZ>Str0
DelVar L1
For(A,0,dim(L1
0
For(B,1,min(7,length(Str1)7A
Ans+.1^(2B)inString(Str0,sub(Str1,B+7A,1
End
Ans>L1(A+1
End
"
Related Routines
Converts a matrix to a string.
[A]  The matrix you want to convert
Str1  The string that the text is stored to
[A], L₁, A, B, Ans, Str1
TI83/84/+/SE
Note: If you have a TI84+ CE with OS 5.2 or higher, you can ignore this entire routine and just use the toString( command.
:dim([A]→L₁:"?
:For(A,1,L₁(1
:For(B,1,L₁(2
:Ans+sub("ABCDEFGHIJKLMNOPQRSTUVWXYZ",[A](A,B),1
:End:End
:sub(Ans,2,length(Ans)1→Str1
With our values stored in [A], we get the dimensions (row x column) of the matrix, which are stored in a list. We then loop through each row and column, and store the character at the respective element to our string that is at the matching position in our substring. In order to construct a string with all of the characters from [A], we first need to create a dummy string. This is what the "? is used for.
Each time through the For( loops, we concatenate the string from before (which is still stored in the Ans variable) to the next character that is found in the matrix. Using Ans allows us to not have to use another string variable, since Ans can act like a string and it gets updated accordingly, and Ans is also faster than a string variable.
By the time we are done with the For( loops, all of our characters are put together in Ans. However, because we stored the dummy character as the first character at the beginning of the string, we now need to remove it, which we do by simply getting the substring from the second character to the end of the string. Finally, we store the string to a more permanent variable (in this case, Str1) for future use.
This routine only allows for values from 1 to 26 in the matrix, since our string of characters is the uppercase alphabet, and each matrix value must match up to one of the string positions. If you add more characters to the string, however, you can increase the range of values in the matrix. This routine uses [A] and L₁, so you should clean them up at the end of your program.
Related Routines
Turns stat plots (all of them, or only those specified) off.
PlotsOff numbers//
Press:
 2nd PLOT to access the stat plot menu.
 4 to select PlotsOff, or use arrows and ENTER.
TI83/84/+/SE
1 byte
By itself, the command will turn off all three stat plots.
If it is given arguments, there can be any number of them (actually, no more than 255, but this won't stop most people), but they must all be numbers 1 to 3. Then, the command will only turn off the specified plots. Unlike some commands, it is okay to give PlotsOff an expression as an argument (for example, PlotsOff X), as long as it has a value of 1, 2, or 3.
Error Conditions
 ERR:DOMAIN is thrown if a plot that is not 1, 2, or 3 is specified.
Related Commands
Turns stat plots (all of them, or only those specified) on.
PlotsOn numbers//
Press:
 2nd PLOT to access the stat plot menu.
 5 to select PlotsOn, or use arrows and ENTER.
TI83/84/+/SE
1 byte
By itself, the command will turn on all three stat plots.
If it is given arguments, there can be any number of them (actually, no more than 255, but this won't stop most people), but they must all be numbers 1 to 3. Then, the command will only turn on the specified plots. Unlike some commands, it is okay to give PlotsOn an expression as an argument (for example, PlotsOn X), as long as it has a value of 1, 2, or 3.
Error Conditions
 ERR:DOMAIN is thrown if a plot that is not 1, 2, or 3 is specified.
Related Commands
Displays a statistical plot of one of six types.
Plot#(type,…
The syntax varies based on the type of plot:
Plot#(Scatter, xlist, ylist, mark, [color#])
Plot#(xyLine, xlist, ylist, mark, [color#])
Plot#(Histogram, xlist, freq list, [color#])
Plot#(Boxplot, xlist, freq list, [color#])
Plot#(ModBoxplot, xlist, freq list, mark, [color#])
Plot#(NormProbPlot, data list, data axis, mark, [color#])
While editing a program, press:
 2nd PLOT to access the stat plot menu.
 1, 2, or 3 (or use arrows) to select Plot1(, Plot2(, Plot3( respectively.
(outside a program, this brings you to the plot editor screen)
TI83/84/+/SE
1 byte
The commands Plot1(, Plot2(, and Plot3(, which are identical except for which stat plot (1, 2, or 3) they affect, define their corresponding stat plot. When the stat plot is defined, it is also turned on so no PlotsOn command is necessary.
The first argument of the commands is always the type of plot, and is one of Scatter, xyLine, Histogram, Boxplot, ModBoxplot, and NormProbPlot  these types are found in the TYPE submenu of the stat plot menu. The other arguments vary. For all but Histogram and Boxplot, there is a mark argument  this is a dot, a cross, or a box, symbols that can be found in the MARK submenu of the stat plot menu. On color calculators, there is an optional final argument to specify the color of the plot.
Scatter plot
Plot#(Scatter, xlist, ylist, mark) defines a scatter plot. The points defined by xlist and ylist are plotted using mark on the graph screen.
xlist and ylist must be the same length.
xyLine plot
Plot#(xyLine, xlist, ylist, mark) defines an xyLine plot. Similarly to a scatter plot, the points defined by xlist and ylist are plotted using mark on the graph screen, but with an xyLine plot they are also connected by a line, in the order that they occur in the lists.
xlist and ylist must be the same length.
Histogram plot
Plot#(Histogram, xlist, freq list) defines a Histogram plot. The xaxis is divided into intervals that are Xscl wide. A bar is drawn in in each interval whose height corresponds to the number of points in the interval. Points that are not between Xmin and Xmax are not tallied.
Xscl must not be too small  it can divide the screen into no more than 47 different bars.
Box plot
Plot#(Boxplot, xlist, freq list) defines a box plot. A rectangular box is drawn whose left edge is Q_{1} (the first quartile) of the data, and whose right edge is Q_{3} (the third quartile). A vertical segment is drawn within the box at the median, and 'whiskers' are drawn from the box to the minimum and maximum data points.
The box plot ignores the Ymax and Ymin dimensions of the screen, and any plots that aren't box plots or modified box plots. Each box plot takes approximately 1/3 of the screen in height, and if more than one are plotted, they will take up different areas of the screen.
Modified box plot
Plot#(ModBoxplot, xlist, freq list, mark) defines a modified box plot. This is almost entirely like the normal box plot, except that it also draws outliers. Whiskers are only drawn to the furthers point within 1.5 times the interquartile range (Q_{3}Q_{1}) of the box. Beyond this point, data points are drawn individually, using mark.
The box plot ignores the Ymax and Ymin dimensions of the screen, and any plots that aren't box plots or modified box plots. Each box plot takes approximately 1/3 of the screen in height, and if more than one are plotted, they will take up different areas of the screen.
Normal probability plot
Plot#(NormProbPlot, data list, data axis, mark) defines a normal probability plot. The mean and standard deviation of the data are calculated. Then for each point, the number of standard deviations it is from the mean is calculated, and the point is plotted against this number using mark. data axis can be either X or Y: it determines whether the value of a point determines it's xcoordinate or ycoordinate.
The point behind this rather convoluted process is to test the extent to which the data is normally distributed. If it follows the normal distribution closely, then the result will be close to a straight line  otherwise it will be curved.
Advanced Uses
After doing a regression, a scatter plot of ∟RESID against the xlist is a useful measure of the effectiveness of the regression. If the plot appears random, this is a good sign; if there is a pattern to the plot, this means it's likely that a better regression model exists.
Optimization
The ∟ symbol at the beginning of list names can be omitted everywhere in this command.
In addition, every element except the plot type and the data list or data lists are optional, and take on the following default values:
 freq list is 1 by default, meaning that all frequencies are 1.
 mark is the box by default.
 data axis is X by default.
Error Conditions
 ERR:DIM MISMATCH is thrown if the x and y lists, or the data and frequency lists, have different dimensions.
 ERR:STAT is thrown if Xscl is too small in the case of a Histogram.
All errors are thrown when plotting the stat plot, as opposed to when the command is executed, and do not provide a 2:Goto option.
Related Commands
Allows the user to select a subinterval of any enabled Scatter or xyLine plots.
Select(xlist name, ylist name)
Press:
 2nd LIST to access the list menu.
 RIGHT to access the OPS submenu.
 8 to select Select(, or use arrows and ENTER.
TI83/84/+/SE
2 bytes
When Select( is called, if it has any Scatter or xyLine plots to work with, it displays the graph screen and allows the user to pick a left bound and then a right bound on one of the plots (the left and right keys move from point to point, while the up and down keys switch plots). Then, it stores all the points between those bounds to xlist name and ylist name. Finally, it sets the chosen plot to use xlist name and ylist name as its X and Y lists.
Optimization
It isn't necessary to add the ∟ symbol before list names:
:Select(∟X,∟Y)
can be
:Select(X,Y)
Error Conditions
 ERR:INVALID is thrown if there are no enabled Scatter or xyLine plots for the command to work with.
Related Commands
Calculates the product of all or part of a list.
prod(list[,start,[end]])
Press:
 2nd LIST to access the list menu.
 LEFT to access the MATH submenu.
 6 to select prod(, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The prod( command calculates the product of all or part of a list.
When you use it with only one argument, the list, it multiplies all the elements of the list. You can also give it a bound of start and end and it will only multiply the elements starting and ending at those indices (inclusive).
prod({1,2,3,4,5})
120
prod({1,2,3,4,5},2,4)
24
prod({1,2,3,4,5},3)
60
Optimization
If the value of end is the last element of the list, it can be omitted:
prod({1,2,3,4,5},3,5)
can be
prod({1,2,3,4,5},3)
Error Conditions
 ERR:DOMAIN if the starting or ending value aren't positive integers.
 ERR:INVALID DIM if the starting or ending value exceed the size of the list, or are in the wrong order.
Related Commands
Sorts a list in descending order.
For more than one list, sorts the first, and reorders other lists accordingly.
SortD(list1 [,list2, …])
Press:
 2nd LIST to access the list menu.
 RIGHT to access the OPS submenu.
 2 to select SortD(, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The SortD( command sorts a list in descending order. It does not return it, but instead edits the original list variable (so it takes only list variables as arguments).
SortD( can also be passed multiple lists. In this case, it will sort the first list, and reorder the others so that elements which had the same indices initially will continue having the same indices. For example, suppose the X and Y coordinates of some points were stored in ∟X and ∟Y, so that the Nth point had coordinates ∟X(N) and ∟Y(N). Then SortD(∟X,∟Y) would sort the points by their xcoordinates, still preserving the same points.
However, SortD( is not stable: if several elements in the first list are equal, then the corresponding elements in the subsequent lists may still end up being in a different order than they were initially.
Algorithm
The algorithm used by SortD( and SortA( appears to be a modified selection sort. It is still O(n^{2}) on all inputs, but for some reason takes twice as long on a list with all equal elements. It is not stable.
Related Commands
Sorts a list in ascending order.
For more than one list, sorts the first, and reorders other lists accordingly.
SortA(list1 [,list2, …])
Press:
 2nd LIST to access the list menu.
 RIGHT to access the OPS submenu.
 ENTER to select SortA(.
TI83/84/+/SE
1 byte
The SortA( command sorts a list in ascending order. It does not return it, but instead edits the original list variable (so it takes only list variables as arguments).
SortA( can also be passed multiple lists. In this case, it will sort the first list, and reorder the others so that elements which had the same indices initially will continue having the same indices. For example, suppose the X and Y coordinates of some points were stored in ∟X and ∟Y, so that the Nth point had coordinates ∟X(N) and ∟Y(N). Then SortA(∟X,∟Y) would sort the points by their xcoordinates, still preserving the same points.
However, SortA( is not stable: if several elements in the first list are equal, then the corresponding elements in the subsequent lists may still end up being in a different order than they were initially.
Algorithm
The algorithm used by SortA( and SortD( appears to be a modified selection sort. It is still O(n^{2}) on all inputs, but for some reason takes twice as long on a list with all equal elements. It is not stable.
Related Commands
Calculates the sum of all or part of a list.
sum(list[,start,[end]])
Press:
 2nd LIST to access the list menu.
 LEFT to access the MATH submenu.
 5 to select sum(, or use arrows and ENTER.
TI83/84/+/SE
1 byte
The sum( command calculates the sum of all or part of a list.
When you use it with only one argument, the list, it sums up all the elements of the list. You can also give it a bound of start and end and it will only sum up the elements starting and ending at those indices (inclusive).
sum({1,2,3,4,5})
15
sum({1,2,3,4,5},2,4)
9
sum({1,2,3,4,5},3)
12
Optimization
If the value of end is the last element of the list, it can be omitted:
sum({1,2,3,4,5},3,5)
can be
sum({1,2,3,4,5},3)
Error Conditions
 ERR:DOMAIN is thrown if the starting or ending value aren't positive integers.
 ERR:INVALID DIM is thrown if the starting or ending value exceed the size of the list, or are in the wrong order.
Related Commands
Creates a matrix of specified size with the entries random integers from 9 to 9.
randM(# rows, # columns)
Press:
 MATRX (TI83) or 2nd MATRX (TI83+ or higher) to access the matrix menu
 RIGHT to access the MATH submenu.
 6 to select randM(, or use arrows.
TI83/84/+/SE
1 byte
randM(M, N) generates an M by N matrix whose entries are pseudorandom integers between 9 and 9 inclusive.
seed→rand affects the output of randM(.
0→rand
0
randM(3,3)
[[9 3 9]
[4 2 0 ]
[7 8 8 ]]
If you actually cared about the bounds of the random numbers, this command would not be very useful, since it's hard to manipulate the matrix to yield uniformly spread random numbers in a different range.
Formulas
The entries of randM( are actually the outputs of successive calls to randInt(9,9), filled in starting at the bottom right and moving left across each row from the last row to the first.
Error Conditions
 ERR:INVALID DIM is thrown if the number of rows or columns of the matrix isn't an integer 199.
Related Commands
A friendly graphing window is some configuration of window variables that's most useful for your program — most commonly, because it makes the coordinate value of a pixel come out to a round value, such as an integer, or .1 of an integer.
Setting up a square window
The most basic type of friendly window is one in which a vertical distance in pixels is equal, coordinatewise, to the same horizontal distance in pixels. This means that the ratio between (XmaxXmin) and (YmaxYmin) is 47:31. Such a setup has the useful effect that drawing a circle (for example, with the Circle( command) actually results in a circle, and not an ellipse.
This can be accomplished simply with the ZSquare command, which will alter the values of the screen so that:
 the coordinate of the center remains the same
 the ratio (XmaxXmin) : (YmaxYmin) is 47:31 (approximately 1.516 : 1)
 the resulting window is larger rather than smaller than the original.
A common technique is to run the ZStandard command first, so that the center of the screen is at (0,0).
Setting up an integer square window
However, it's possible to take friendliness even further, by adding the condition that coordinate values of a pixel come out to round values without long decimals. This can be done in several ways:
Using the ZDecimal command
This is by far the simplest — the ZDecimal command will set Xmin to 4.7, Xmax to 4.7, Ymin to 3.1, and Ymax to 3.1. As you can see, this satisfies the condition for a square window. Also, the coordinates of pixels have at most one decimal place: pixels that are next to each other differ by 0.1 in the appropriate coordinate.
Zdecimal is useful if you only need to do a few point/line commands, like if you were drawing a border around the screen using Horizontal and Vertical.
However, it has the drawback of still having a decimal point. Your drawing commands may look like Line(3.1, 1.7, 3.1, 1.7) — if you didn't have to have that decimal point there, you'd save a considerable amount of space. This is possible, using the following three methods:
An integer window with (0,0) in the center
These methods are basically divided over where the point (0,0) should be. Putting it in the center ensures that drawing things in the middle of the screen takes up little space; also, you can achieve symmetry easily by appropriately negating numbers. On the other hand, the negative sign (you'll be using one 3/4 of the time, and 1/4 of the time you'll need two) can be annoying.
The following code sets up an integer square window with (0,0) in the center:
:ZStandard
:ZInteger
An integer window with (0,0) in the bottom left corner
This approach is optimal in terms of saving space on coordinates: they are all positive numbers with at most two digits. For this reason, it is the most widely used. The following code sets up such a window:
:ZStandard
:84→Xmin
:72→Ymax
:ZInteger
An integer window with (0,0) in the top left corner
This approach is useful for when point and pixel commands need to be used together. Although putting (0,0) in the top left makes every Ycoordinate negative, the window has the useful property that it's very easy to go from point commands to pixel commands: the pixel (R,C) corresponds to the point (C,R), and equivalently, the point (X,Y) corresponds to the pixel (Y,X). It's somewhat trickier to set up, though:
:ZStandard
:84→Xmin
:72→Ymin
:ZInteger
Why friendly windows are useful
Throughout this article, we've only made glancing comments as to why you'd want to use friendly windows. Here is a more exhaustive explanation:
Graphs come out nicer
Even with a square window, graphs become more accurate, because they reflect the actual proportions of the equation being graphed. For example, try drawing a circle in the standard graphing window — you'll get some stretched out oval. Now ZSquare and try again. The result is much better, right?
With an integer square window, certain other imperfections of the calculator's graphing go away. For example, try graphing Y=1/(X+1) in the standard graphing window. Pretty accurate, but instead of the asymptote there's a slightly diagonal line. That's because the asymptote doesn't end up corresponding to a pixel of the graph: one pixel, the curve is a very negative number, the next it's a very positive number, so the calculator tries to connect them.
Now ZDecimal and graph 1/(X+1) again. The nearly vertical line at the asymptote disappears: because the value X=1 matches a pixel on the graph, so the calculator realizes that something is undefined there.
Another similar problem occurs with graphing Y={1,1}√(9X²). In most graphing windows, this graph, which should come out to a circle, has some gaps near the sides. In an integer square window, such as with ZDecimal, the gaps disappear, and you're left with a perfect circle.
Coordinates are round numbers
This is a more programmingrelated application. If you happen to need to draw something on the screen, in a program, you're likely to need a lot of Line( or PtOn( commands at fairly specific locations. On a normal window, such a "specific location" might end up being (2.553,0.645) or something equally ugly, with unpredictable results if you try to round it to the nearest nice value (since you don't know exactly the point at which pixels change).
With a friendly window (for this purpose, an integer window with (0,0) in the bottom left is the friendliest), every single pixel has a round coordinate value. If each value is no more than a 2digit number, you can even compress all the coordinates of a line into a single number — this technique was used, for example, in Bryan Thomas' Contra game.
Point and pixel commands are compatible
In the case of an arbitrary window, it's fairly difficult to convert from a pixel coordinate to a point coordinate and back: the exact formula is X=Xmin+CΔX, Y=YmaxRΔY if (X,Y) is the point and (R,C) is the pixel (going from pixel to point is even more painful). However, there are many cases in which you do need to go back and forth — for example, if you need to draw both text and lines at a coordinate. With friendly windows, this formula becomes much simpler — such as (X,Y)=(C,R) for the last integer window we discussed.
Enables sequence graphing mode.
Seq
While editing a program, press:
 MODE to access the mode menu.
 Use arrows to select Seq.
TI83/84/+/SE
1 byte
The Seq command enables sequence graphing mode.
Sequential mode is used for graphing sequences, which can be thought of as functions from the positive (or nonnegative) integers. The TI83 calculators let n be the independent variable in this situation, and the three sequences, instead of using subscripts, use the letters u, v, and w.
One of the main advantages of sequential mode is that it allows recursive definitions: u(n) can be defined in terms of u(n1) and u(n2). For recursive definitions to work, an initial case must be defined: this is done using the variables u(nMin), v(nMin), and w(nMin). The constant nMin is the initial case, for which the calculator will use a specific value rather than the formula.
For example, say a bunny population starts out at 100 and doubles each year. We can describe this situation using the recursive definition u(n)=2u(n1) (this just says that the nth year population is twice the population of the previous year); then we set u(nMin)=100. Note that without u(nMin), the equation would be meaningless  without the initial population, we have no way to calculate any other population.
When you're using more than one previous value — both u(n1) and u(n2)) — you need more than one initial value, and then u(nMin) becomes a list.
Advanced Uses
Sequence graphing mode has several submodes that can be selected from the 2nd FORMAT screen. They are Time, Web, uvAxes, uwAxes, and vwAxes. Sequences are still defined in the same way, but these modes control the way that they're graphed.
The window variables that apply to sequence mode are:
 nMin — Determines the minimum nvalue calculated for equations.
 nMax — Determines the maximum nvalue calculated for equations.
 PlotStart — Determines the first value of n that is actually graphed.
 PlotStep — Determines the difference between consecutive graphed values of n.
 Xmin — Determines the minimum Xvalue shown on the screen.
 Xmax — Determines the maximum Xvalue shown on the screen.
 Xscl — Determines the horizontal space between marks on the Xaxis in AxesOn mode or dots in GridOn mode.
 Ymin — Determines the minimum Yvalue shown on the screen.
 Ymax — Determines the maximum Yvalue shown on the screen.
 Yscl — Determines the vertical space between marks on the Yaxis in AxesOn mode or dots in GridOn mode.
Related Commands
Enables polar graphing mode.
Polar
While editing a program, press:
 MODE to access the mode menu.
 Use arrows to select Pol.
TI83/84/+/SE
1 byte
The Polar command enables the polar graphing mode.
Unlike the previous modes, polar mode doesn't use the more common (x,y) coordinates. Instead, the coordinates (r,θ) are used, where θ is the counterclockwise angle made with the positive xaxis, and r is the distance away from the origin (the point (0,0)). Although it's possible to translate from one system to the other, polar coordinates are more useful for some expressions (and, of course, less useful for others).
In particular, they're very good at graphing anything circlerelated. The equation for a circle in polar mode is just r=1 (or any other number, for a circle of different radius).
Like in parametric mode, the parameter θ uses the window variables θmin, θmax, and θstep to determine which points are graphed. A common situation is θmin=0, θmax=2π: in Radian mode, this corresponds to going all the way around the circle. Of course, you could use Degree mode and set θmax to be 360, but this is uncommon in mathematics.
Advanced Uses
The window variables that apply to polar mode are:
 θmin — Determines the minimum θvalue graphed for equations.
 θmax — Determines the maximum θvalue graphed for equations.
 θstep — Determines the difference between consecutive θvalues.
 Xmin — Determines the minimum Xvalue shown on the screen.
 Xmax — Determines the maximum Xvalue shown on the screen.
 Xscl — Determines the horizontal space between marks on the Xaxis in AxesOn mode or dots in GridOn mode.
 Ymin — Determines the minimum Yvalue shown on the screen.
 Ymax — Determines the maximum Yvalue shown on the screen.
 Yscl — Determines the vertical space between marks on the Yaxis in AxesOn mode or dots in GridOn mode.
Related Commands
Enables parametric graphing mode.
Param
While editing a program, press:
 MODE to access the mode menu.
 Use arrows to select Par.
TI83/84/+/SE
1 byte
The Param command enables parametric graphing mode.
Parametric mode is in many ways a generalization of function mode. Instead of writing y as a function of x, both x and y are written as a function of a parameter t (hence the name, parametric mode). You can easily see that equations in function mode are just a special case of equations in parametric mode: if you set x equal to t, then writing y=f(t) is equivalent to writing y=f(x). Of course, graphing a function this way on a calculator will be slightly slower than doing it in function mode directly, because of the overhead.
Parametric mode allows you the greatest freedom of all the possible graphing modes  nearly every curve you could encounter can be expressed in parametric form.
In mathematics, the parameter t is commonly allowed to take on all values from negative to positive infinity. However, this would be impossible to do on a calculator, since the equation would never stop graphing (unlike function mode, there's no easy way to check for which values of t the equation will go off the screen and there's no need to graph it). Instead, the calculator has window variables Tmin, Tmax, and Tstep: it will evaluate the parameter at every value from Tmin to Tmax, increasing by Tstep each time, and 'connect the dots'.
Polar mode, which you'll read about in the next section, is also a special case of parametric mode: To graph r=f(θ), you can instead graph x=f(t)cos(t) and y=f(t)sin(t), with t graphed over the same interval as θ.
Advanced Uses
The window variables that apply to parametric mode are:
 Tmin — Determines the minimum Tvalue graphed for equations.
 Tmax — Determines the maximum Tvalue graphed for equations.
 Tstep — Determines the difference between consecutive Tvalues.
 Xmin — Determines the minimum Xvalue shown on the screen.
 Xmax — Determines the maximum Xvalue shown on the screen.
 Xscl — Determines the horizontal space between marks on the Xaxis in AxesOn mode or dots in GridOn mode.
 Ymin — Determines the minimum Yvalue shown on the screen.
 Ymax — Determines the maximum Yvalue shown on the screen.
 Yscl — Determines the vertical space between marks on the Yaxis in AxesOn mode or dots in GridOn mode.
Related Commands
Enables function graphing mode.
Func
While editing a program, press:
 MODE to access the mode menu.
 Use arrows to select Func.
TI83/84/+/SE
1 byte
The Func command enables function graphing mode. This is usually unnecessary in a program, but if you want to graph a Y# equation, you'd want to make sure the calculator is in function mode first.
In function mode, you can graph equations where y (the vertical coordinate) is a function of x (the horizontal coordinate). This mode is most commonly discussed in algebra and singlevariable calculus courses. Many curves, such as a parabola, have simple expressions when written in the form y=f(x).
However, in function mode, many expressions cannot be graphed at all. For example, a circle can't be easily graphed in function mode, since for some xvalues, there are two yvalues. Using two functions, you can achieve a circle, but it will still require a friendly graphing window to display perfectly.
Many calculator features are specifically targeted at function mode graphing. For example, two graphing styles (see GraphStyle() can be only used with function mode. The DrawF command draws a function in graphing mode.
Advanced Uses
The window variables that apply to function mode are:
 Xmin — Determines the minimum Xvalue shown on the screen.
 Xmax — Determines the maximum Xvalue shown on the screen.
 Xscl — Determines the horizontal space between marks on the Xaxis in AxesOn mode or dots in GridOn mode.
 Ymin — Determines the minimum Yvalue shown on the screen.
 Ymax — Determines the maximum Yvalue shown on the screen.
 Yscl — Determines the vertical space between marks on the Yaxis in AxesOn mode or dots in GridOn mode.
 Xres — Determines the pixel distance between points used for graphing. This is a value 18: 1 for best quality, 8 for best speed.
Related Commands
The TI83 series of graphing calculators can graph equations in four modes: function mode, parametric mode, polar mode, and sequential mode.
Since this website is primarily aimed at calculator programmers, rather than all calculator users, this information may not have many immediate applications, since graphing equations isn't often useful in programs. However, math programs may require information such as this, and in general, the better you understand all the features of your calculator, the better you'll be able to program it.
The four graphing modes are enabled with the Func, Param, Polar, and Seq commands.
Function Mode
In function mode, you can graph equations where y (the vertical coordinate) is a function of x (the horizontal coordinate). This mode is most commonly discussed in algebra and singlevariable calculus courses. Many curves, such as a parabola, have simple expressions when written in the form y=f(x).
However, in function mode, many expressions cannot be graphed at all. For example, a circle can't be easily graphed in function mode, since for some xvalues, there are two yvalues. Using two functions, you can achieve a circle, but it will still require a friendly graphing window to display perfectly.
Many calculator features are specifically targeted at function mode graphing. For example, two graphing styles (see GraphStyle() can be only used with function mode. The DrawF command draws a function on the graph screen.
Parametric Mode
Parametric mode is in many ways a generalization of function mode. Instead of writing y as a function of x, both x and y are written as a function of a parameter t (hence the name, parametric mode). You can easily see that equations in function mode are just a special case of equations in parametric mode: if you set x equal to t, then writing y=f(t) is equivalent to writing y=f(x). Of course, graphing a function this way on a calculator will be slightly slower than doing it in function mode directly, because of the overhead.
Parametric mode allows you the greatest freedom of all the possible graphing modes  nearly every curve you could encounter can be expressed in parametric form.
In mathematics, the parameter t is commonly allowed to take on all values from negative to positive infinity. However, this would be impossible to do on a calculator, since the equation would never stop graphing (unlike function mode, there's no easy way to check for which values of t the equation will go off the screen and there's no need to graph it). Instead, the calculator has window variables Tmin, Tmax, and Tstep: it will evaluate the parameter at every value from Tmin to Tmax, increasing by Tstep each time, and 'connect the dots'.
Polar mode, which you'll read about in the next section, is also a special case of parametric mode: To graph r=f(θ), you can instead graph x=f(t)cos(t) and y=f(t)sin(t), with t graphed over the same interval as θ.
Polar Mode
Unlike the previous modes, polar mode doesn't use the more common (x,y) coordinates. Instead, the coordinates (r,θ) are used, where θ is the counterclockwise angle made with the positive xaxis, and r is the distance away from the origin (the point (0,0)). Although it's possible to translate from one system to the other, polar coordinates are more useful for some expressions (and, of course, less useful for others).
In particular, they're very good at graphing anything circlerelated. The equation for a circle in polar mode is just r=1 (or any other number, for a circle of different radius).
Like in parametric mode, the parameter θ uses the window variables θmin, θmax, and θstep to determine which points are graphed. A common situation is θmin=0, θmax=2π: in Radian mode, this corresponds to going all the way around the circle. Of course, you could use Degree mode and set θmax to be 360, but this is uncommon in mathematics.
Sequential Mode
Sequential mode is used for graphing sequences, which can be thought of as functions from the positive (or nonnegative) integers. The TI83 calculators let n be the independent variable in this situation, and the three sequences, instead of using subscripts, use the letters u, v, and w.
One of the main advantages of sequential mode is that it allows recursive definitions: u(n) can be defined in terms of u(n1) and more generally in terms of u(nk) for any k. For recursive definitions to work, an initial case must be defined: this is done using the variables u(nMin), v(nMin), and w(nMin). The constant nMin is the initial case, for which the calculator will use a specific value rather than the formula.
For example, say a bunny population starts out at 100 and doubles each year. We can describe this situation using the recursive definition u(n)=2u(n1) (this just says that the nth year population is twice the population of the previous year); then we set u(nMin)=100. Note that without u(nMin), the equation would be meaningless  without the initial population, we have no way to calculate any other population.
When you're using more than one previous value (for example, u(n1) and u(n2)) you need more than one initial value, and then u(nMin) becomes a list.
The abbreviation "seq" is ambiguous and may refer to:
 seq(, the list command evaluating an expression at several values.
 Seq, the mode command that selects sequential graphing mode.
 Sequential, the mode command that sets equations to graph one after the other.
If an internal link led you here, you may wish to change the link to point directly to the intended article.
Sets the graphing style of a graphing equation in the current mode.
GraphStyle(equation #, style #)
While editing a program, press:
 PRGM to access the programming menu.
 ALPHA H to select GraphStyle(, or use arrows.
TI83/84/+/SE
2 bytes
The GraphStyle( command allows you to set the graphing style of an equation (line, thick line, dotted line, etc.) from within a program.
Its first argument, equation #, is the number of the equation whose graphing style you want to change  this depends on the mode you're in. For example, if you wanted to change the graphing style of Y_{1}, you would need to be in function mode and use the value 1 for this argument. If you wanted to change the graphing style of r_{4}, you would need to be in polar mode and use the value 4.
The second argument is a number from 1 to 7, which translates to a graphing style as follows:
 1  a normal line, usually the default graph style.
 2  a thick line (three pixels wide).
 3  a line, with everything above it shaded (only valid in function mode).
 4  a line, with everything below it shaded (only valid in function mode).
 5  a path: a line, with a ball moving along it as it is graphed (not valid in sequential mode).
 6  animated: a ball moving along the graph (not valid in sequential mode).
 7  a dotted line.
Compare this to the effect of Connected or Dot mode. When either of these modes is set, all equations, from all graphing modes, are reverted to line style or dotted line style respectively; furthermore, it becomes the default graph style and clearing an equation will revert it to this graph style. The GraphStyle( command simply overrides these modes temporarily.
Advanced
In shading modes (3 and 4), the shading style cycles as follows:
 The first function graphed shades using vertical lines one pixel apart
 The second function shades using horizontal lines one pixel apart
 The third function shades using negatively sloping diagonal lines, two pixels apart.
 The fourth function shades using positively sloping diagonal lines, two pixels apart.
 After that, functions will cycle through these four styles in that order.
Error Conditions
 ERR:DOMAIN if the equation # is not a valid equation number in this mode, or if style # is not an integer 17.
 ERR:INVALID if the graphing style chosen is not valid for the current graphing mode.
Related Commands
Calculates the differences between consecutive terms of a list.
ΔList(list)
Press:
 2nd LIST to access the list menu.
 RIGHT to access the OPS submenu.
 7 to select ΔList(, or use arrows.
TI83/84/+/SE
2 bytes
ΔList( calculates the differences between consecutive terms of a list, and returns them in a new list.
ΔList({0,1,4,9,16,25,36})
{1 3 5 7 9 11}
Advanced Uses
The ΔList( command is very nearly the inverse of the cumSum( command, which calculates the cumulative sums of a list. For any list, ΔList(cumSum(list)) will return the same list, but without its first element:
ΔList(cumSum({1,2,3,4,5,6,7}))
{2 3 4 5 6 7}
Removing the first element would otherwise be a difficult procedure involving the seq( command, so this is a useful trick to know.
If a list is sorted in ascending order, min(ΔList(list)) will return 0 (false) if there are repeating values in the list, and a value corresponding to true if they are all distinct.
Error Conditions
 ERR:INVALID DIM is thrown if ΔList( is run on a single element list.
Related Commands
Calculates cumulative sums of a list or of the columns of a matrix.
cumSum(list or matrix)
Press:
 2nd LIST to access the list menu.
 RIGHT to access the OPS submenu.
 6 to select cumSum(, or use arrows.
Alternatively, press:
 MATRIX (TI83) or 2nd MATRIX (TI83+ or higher) to access the matrix menu.
 RIGHT to access the MATH submenu.
 0 to select cumSum(, or use arrows.
TI83/84/+/SE
2 bytes
cumSum( calculates the cumulative sums of a list, or of the columns of a matrix, and outputs them in a new list or matrix variable.
For a list, this means that the Nth element of the result is the sum of the first N elements of the list:
cumSum({1,3,5,7,9})
{1 4 9 16 25}
For a matrix, cumSum( is applied to each column in the same way as it would be for a list (but numbers in different columns are never added):
[[0,1,1][0,1,3][0,1,5][0,1,7]]
[[0 1 1]
[0 1 3]
[0 1 5]
[0 1 7]]
cumSum(Ans)
[[0 1 1]
[0 2 4]
[0 3 9]
[0 4 16]]
Advanced Uses
The ΔList( command is very nearly the inverse of the cumSum( command  it calculates the differences between consecutive elements. For any list, ΔList(cumSum(list)) will return the same list, but without its first element:
ΔList(cumSum({1,2,3,4,5,6,7}))
{2 3 4 5 6 7}
Removing the first element would otherwise be a difficult procedure involving the seq( command, so this is a useful trick to know.
For a matrix, if you want to sum up the rows instead of the columns, use the ^{T} (transpose) command.
Related Commands
System variables are, for the purposes of this guide, variables that certain commands will use or modify without asking (i.e. without supplying them in the command's arguments). This is a somewhat illdefined category, and in fact the system variables we'll discuss are of a somewhat miscellaneous nature. They include equation and plot variables, window and table parameters, statistical variables, and finance variables.
Equation variables and plot variables
The equation variables include Y_{0} through Y_{9} (function variables), X_{1T} and Y_{1T} through X_{6T} and Y_{6T} (parametric variables), r_{1} through r_{6} (polar variables), and u, v, w (sequential variables). They are used when graphing an equation on the graph screen. From the point of view of a programmer, it's important to realize that these variables are actually strings in disguise. That is to say, they are stored internally as strings, though the string operations and commands won't work on them. Instead, the following operations are valid for equations:
 Evaluating them, by using the equation variable in an expression.
 Evaluating them at a point, using the syntax EqVar(value)  for example, Y_{1}(5). This will plug value in for the independent variable  X, T, θ, or n for function, parametric, polar, and sequential variables respectively.
 Storing a string to them.
 Using the Equ►String( or String►Equ( command to go back and forth from string to equation form.
In addition to their string contents, an equation variable contains two other pieces of information  the graphing style, set with the GraphStyle( command, and the state (enabled or disabled), set with the FnOn and FnOff commands. There is unfortunately, no way to find out which graphing style or state a variable is in, you can only set these to a value.
Plot variables are used for displaying data graphically, in one of six styles: scatter plot, line plot, histogram, box plot, modified box plot, and normal plot. What the variables actually store varies with the plot type, but includes one or more data lists, and settings. All of this can be set with the PlotN( command. All or some plots can be turned on and off with the PlotsOn and PlotsOff commands. The Select( command is also useful for dealing with plots.
Window and table parameters
These store auxiliary information about the graphing window and include:
 Xmin, Xmax, Ymin, Ymax — determine the lower and upper X and Y bounds of the graph screen itself.
 ΔX, ΔY — defined to be (XmaxXmin)/94 and (YmaxYmin)/62 respectively; storing to them will change Xmax and Ymax to arrange this.
 Xscl, Yscl — determine how wide the marks on the axes (and, with GridOn, the grid marks) are spaced.
 Xres — determines the quality of Function graphing (how many pixels apart points are calculated), and must be an integer 18.
 Tmin, Tmax, Tstep — determine the values at which T is evaluated in Parametric graphing (as though it were a For( loop).
 θmin, θmax, θstep — the same idea, but for the θ variable in Polar graphing.
 nMin, nMax — bounds for the n variable to evaluate (the step is always 1; also, these must be integers).
 u(nMin), v(nMin), w(nMin)  override the value of u, v, and w at nMin, for the purposes of recursively defining them.
 PlotStart, PlotStep — actually have nothing to do with plots, but determine which values of n are graphed.
 all of the above have a Z equivalent (ZXmin, Zθstep, etc.) that's used by ZoomSto and ZoomRcl.
 XFact, YFact — the scaling factors for Zoom In and Zoom Out.
 TblStart, ΔTbl — the starting value and step for the independent variable in the table screen.
 TblInput — a 7element list of the values of a variable in the table.
When transferring variables between calculators, or grouping variables, these variables are grouped in Window, rclWindow, and TblSet.
You can store to each of the window variables directly, or use the zoom commands, which affect multiple variables at once to achieve some effect.
You can use these to some extent as real variables to store values in a program, but their use is limited to the home screen (because they affect the graph screen) and there are limits to their ranges. For example, Xmax must be greater than Xmin.
Statistical Variables
These cannot be stored to, although their values can be used  instead they are modified by statistical commands, which use them as output. See the statistics pages for more information. Notably, the list LRESID is taken up on the CE.
Finance Variables
The seven finance variables are N, I%, PV, PMT, FV, P/Y, and C/Y. They are used by the finance solver tool; to use the solver in a program, set these variables to the values you want, choose one of the options Pmt_End or Pmt_Bgn, and then use the value tmv_VAR (where VAR is the variable you want to solve for).
Another use of the finance variables is in speedcritical sections of code: they are faster to access even than Ans. Somewhat offsetting this advantage is the fact that they are two byte tokens, and that they don't work as the variables of a seq( command or a For( loop (they will actually throw a ERR:SYNTAX error) or IS>( and DS>(. In addition the value of C/Y is altered when P/Y is altered.
Fills a list or matrix with one number.
Fill(value,matrix)
Press:
 2nd LIST to access the list menu.
 RIGHT to access the OPS submenu.
 4 to select Fill(, or use arrows.
Alternatively, press:
 MATRX (83) or 2nd MATRX (83+ or higher) to access the matrix menu.
 RIGHT to access the MATH submenu.
 4 to select Fill(, or use arrows.
TI83/84/+/SE
1 byte
The Fill( command takes an existing list or matrix variable and sets all its elements to a single number. It doesn't return anything and only works on already defined variables.
{5}→dim(L1)
Fill(2,L1)
L1
{2 2 2 2 2}
{3,4}→dim([A])
Fill(1,[A])
[A]
[[1 1 1 1]
[1 1 1 1]
[1 1 1 1]]
Fill( is very fast: on a twentyelement real list, it takes only about 3.5 ms, much less than any vectorized list operation.
When Fill( is called on a list, the datatype of the list becomes the datatype of the number. That is, Fill(1,L₁) makes L₁ a real list, and Fill(i,L₁) makes L₁ a complex list.
Optimization
When creating a new list or matrix you want to fill with zeroes, it's better to delete it then create it with dim(, which will set all entries to 0, than to set its dimensions with dim( (which may not clear what was there before) then use Fill(.
Errors
On a TI84+CSE, using Fill(List,List) will cause a RAM clear. For example: Fill({1,2,3},{1,2,3} will cause a RAM Clear. This does not apply on any other models, as they only give you argument and data type errors.
Related Commands
Command Summary
This command calculates the transpose of a matrix.
Command Syntax
matrix^{T}
Menu Location
Press:
 MATRX (on the 83) or 2nd MATRX (83+ or higher) to access the Matrix menu.
 LEFT to access the MATH submenu
 2 to select ^{T}, or use arrows
Calculator Compatibility
TI83/84/+/SE
Token Size
The ^{T} command is used to calculate the transpose of a matrix: it flips a matrix along its main diagonal. This means that the (i,j)th element becomes the (j,i)th element, and vice versa. As a result, the transpose of an M by N matrix is an N by M matrix.
[[1,2,3][4,5,6]]
………… [[1 2 3]
…………. [4 5 6]]
Ans^{T}
………… [[1 4]
…………. [2 5]
…………. [3 6]]
Advanced Uses
In addition to its many uses in linear algebra, the ^{T} operation is useful to programmers: with operations such as Matr►list( and augment(, which normally deal with columns, ^{T} allows you to use rows instead. See the "Related Commands" section for the commands that this is useful for.
Related Commands
 augment(
 cumSum(
 Matr►list(
 rowSwap( (and other row operations)
Generates a random number with the binomial distribution.
randBin(n,p,# simulations)
Press:
 MATH to access the math menu.
 LEFT to access the PRB submenu.
 7 to select randBin(, or use arrows.
TI83/84/+/SE
2 bytes
randBin(n,p) generates a pseudorandom integer between 0 and n inclusive according to the binomial distribution B(n,p)  that is, n trials of an event with probability of success p are performed, and the number of successes is returned. randBin(n,p,simulations) performs the above calculation simulations times, and returns a list of the results. The expected (average) result is n*p.
n should be an integer greater than or equal to 1, while p should be a real number between 0 and 1 inclusive.
seed→rand affects the output of randBin(
0→rand
0
randBin(5,1/2
2
randBin(5,1/2,10
{3 3 2 4 3 2 2 2 4 3}
Formulas
The value of randBin( for a given seed can be expressed in terms of rand:
randBin(N,P)=sum(P>rand(N
This is identical to the output of randBin( in the sense that for the same seed, both expressions will generate the same random numbers.
Error Conditions
 ERR:DOMAIN is triggered if the probability is not on the interval from 0 to 1.
Related Commands
Generates a random normallydistributed number with specified mean and standard deviation.
randNorm(µ,σ,[n])
Press:
 MATH to access the math menu.
 LEFT to access the PRB submenu.
 6 to select randNorm(, or use arrows.
TI83/84/+/SE
2 bytes
randNorm(µ,σ) generates a normallydistributed pseudorandom number with mean µ and standard deviation σ. The result returned will most probably be within the range µ±3σ. randNorm(µ,σ,n) generates a list of n normallydistributed pseudorandom numbers with mean µ and standard deviation σ.
seed→rand affects the output of randNorm(.
0→rand
0
randNorm(0,1)
1.585709623
randNorm(0,1,3)
{1.330473604 1.05074514 .0368606663}
Although a theoretical normally distributed variable could take on any real value, numbers on a calculator have a limited precision, which leads to a maximum range of approximately µ±7.02σ for values of randNorm(.
Optimization
When the mean is 0 and the standard deviation 1, invNorm(rand) and invNorm(rand(N)) save space over randNorm(0,1) and randNorm(0,1,N) respectively.
Formulas
The value of randNorm( for a given seed can be expressed in terms of rand:
randNorm(µ,σ)=µσinvNorm(rand
This is identical to the output of randNorm( in the sense that for the same seed, both expressions will generate the same random numbers.
The following formula can be used to get a target interval where A and B are two real intervals.
µ=(A+B)/2
σ=(A+B)/6
Related Commands
Generates a random integer between min and max, inclusive, or a list of such numbers.
randInt(min,max[,# of numbers])
Press:
 MATH to access the math menu.
 LEFT to access the PRB submenu.
 5 to select randInt(, or use arrows.
TI83/84/+/SE
2 bytes
randInt(min,max) generates a uniformlydistributed pseudorandom integer between min and max inclusive. randInt(min,max,n) generates a list of n uniformlydistributed pseudorandom integers between min and max.
seed→rand affects the output of randInt(.
0→rand
0
randInt(1,10)
10
randInt(1,10,5)
{10 2 6 5 8}
Optimization
When the lower bound of randInt( is 0, you can replace it with int(#rand to save space. For example:
:randInt(0,12
can be
:int(13rand
Similarly, if you don't want to include zero in the range, you can use a variant of 1#int(#rand:
:12int(2rand
In this particular example, the only values that you will ever get are 1 or 1.
Formulas
The value of randInt( for a given seed can be expressed in terms of rand:
randInt(A,B)=
 when A<B, A+int((BA+1)rand
 otherwise, B+int((AB+1)rand
This is identical to the output of randInt( in the sense that for the same seed, both expressions will generate the same random numbers.
Error Conditions
 ERR:DOMAIN is thrown if any of the arguments is a decimal.
 ERR: DATA TYPE is given if you use imaginary numbers like 6i or something like Matrices or Lists. This error is used instead of ERR:DOMAIN for "i".
Related Commands
Calculates the factorial of a number or list.
value!
Press:
 MATH to access the math menu.
 LEFT to access the PRB submenu.
 4 to select !, or use arrows.
TI83/84/+/SE
1 byte
! is the factorial function, where n! = n*(n1)! and 0! = 1, n an nonnegative integer. The function also works for arguments that are half an odd integer and greater than 1/2: $(\frac1{2})!$ is defined as $\sqrt{\pi}$ and the rest are defined recursively. 69 is the largest number for which the calculator can perform the operation.
3!
6
(‾.5)!
1.772453851
Ans²
3.141592654
The combinatorial interpretation of factorials is the number of ways to arrange n objects in order.
Error Conditions
 ERR:DOMAIN for any numbers except the ones mentioned above.
Related Commands
Calculates the combinatorial number of combinations.
a nCr b
Press:
 MATH to access the math menu.
 LEFT to access the PRB submenu.
 3 to select nCr, or use arrows.
TI83/84/+/SE
1 byte
nCr is the number of combinations function (or binomial coefficient), defined as a nCr b = a!/(b!*(ab)!), where a and b are nonnegative integers. The function also works on lists.
Tip: nCr has a higher priority in evaluation than operators such as + or *: for example, 5X nCr 10 will be interpreted as 5(X nCr 10) and not as (5X) nCr 10. You might wish to use parentheses around complex expressions that you will give to nCr as arguments.
6 nCr 4
15
The combinatorial interpretation of a nCr b is the number of ways to choose b objects, out of a total of a, if order doesn't matter. For example, if there 10 possible pizza toppings, there are 10 nCr 3 ways to choose a 3topping pizza.
Error Conditions
 ERR:DIM MISMATCH is thrown when applying nCr to two lists that have different dimensions.
 ERR:DOMAIN is thrown for negative integers or decimals.
Related Commands
Calculates the combinatorial number of permutations.
a nPr b
Press:
 MATH to access the math menu.
 LEFT to access the PRB submenu.
 2 to select nPr, or use arrows.
TI83/84/+/SE
1 byte
nPr is the number of permutations function, defined as a nPr b = a!/(ab)!, where a and b are nonnegative integers. The function also works on lists.
Tip: nPr has a higher priority in evaluation than operators such as + or *: for example, 5X nPr 10 will be interpreted as 5(X nPr 10) and not as (5X) nPr 10. You might wish to use parentheses around complex expressions that you will give to nPr as arguments.
6 nPr 4
360
The combinatorial interpretation of a nPr b is the number of ways to choose b objects in order, when there are a objects in total. For example, when giving 1st, 2nd, and 3rd place awards in a competition between 10 teams, there are 10 nPr 3 different ways to assign the awards.
Error Conditions
 ERR:DIM MISMATCH is thrown when applying nPr to two lists that have different dimensions.
 ERR:DOMAIN is thrown for negative integers or decimals.
Related Commands
Generates a random number between 0 and 1, or a list of such numbers. Can also be used to set the random number seed.
rand
rand(# of numbers)
seed→rand
Press:
 MATH to access the math menu.
 LEFT to access the PRB submenu.
 ENTER to select rand.
TI83/84/+/SE/CE
1 byte
rand generates a uniformlydistributed pseudorandom number (this page and others will sometimes drop the pseudo prefix for simplicity) between 0 and 1. rand(n) generates a list of n uniformlydistributed pseudorandom numbers between 0 and 1. seed→rand seeds (initializes) the builtin pseudorandom number generator. The factory default seed is 0.
L'Ecuyer's algorithm is used by TI calculators to generate pseudorandom numbers.
0→rand
0
rand
.9435974025
rand(2)
{.908318861 .1466878292}
Note: Due to specifics of the random number generating algorithm, the smallest number possible to generate is slightly greater than 0. The largest number possible is actually 1, but since returning a result of 1 would mess up the output of randBin( and randNorm(, the actual value returned in such cases is 11.11e12 (which is displayed as 1, and is "equal" to 1 for the purposes of the = command). To see 1, store 196164532 to rand and then run the random number generator. If you instead try to store the “random” value directly to a list element, the value as viewed inside of the list editor will be 11.11e12, displayed as 0.99999999999889.
Advanced Uses
To seed the random number generator, store a positive integer to rand (the command will ignore any decimals, and the sign of the number). Seeding the random number generator has several uses:
When writing a program that uses random numbers, you may add a 0→rand instruction to the beginning of the program — this ensures that the program's actions will be repeatable, making it easier to fix a bug. Just don't forget to take it out when you've finished writing the program.
Seeding the random number generator can also be used to create fairly secure (unbreakable without a computer) encryption. Pick a secret key, and store it to rand as a seed. Then, perform some randomly generated manipulations on the data you want to encode — for example, shifting each character of a string by a random number. Decoding the message is simple: store the secret key to rand and perform the opposite of those random operations. However, this is impossible to do if you don't know the secret key.
When seeding the random number generator, as above, you make every random number generated afterwards predictable. This may be problematic even if your program doesn't need random numbers, because other programs might. To prevent this, use the following code to save and restore "randomness":
:randInt(1,E9)→N
(code that involves seeding the RNG here)
:N→rand
Since generating random numbers is a fairly timeconsuming operation, the rand(# of numbers) syntax is very effective at generating a delay in your program — just add the line:
:rand(N)
The bigger N is, the longer the delay. In relation to the commonly used For( loop delay, the number used in the rand( delay is about 10 times smaller. However, this code has a side effect of storing a list of random numbers to Ans, which may be undesirable. To avoid this, use this somewhat longer line:
:If dim(rand(N))
Despite the presence of an If statement, you don't have to worry about the next line being skipped, since dim(rand(N)) will always be true.
Error Conditions
 ERR:DOMAIN if you try to generate a list of random numbers and the list length isn't an integer 1999.
Related Commands
Returns the imaginary part of a complex number.
imag(value)
Press:
 MATH to access the math menu.
 RIGHT, RIGHT to access the CPX (complex) submenu.
 3 to select imag(, or use arrows.
TI83/84/+/SE
2 bytes
imag(z) returns the imaginary part of the complex number z. If z is represented as x+iy where x and y are both real, imag(z) returns y. Also works on a list of complex numbers.
imag(3+4i)
4
imag({3+4i,2i,17})
{4,2,0}
Related Commands
Returns the real part of a complex value.
real(value)
Press:
 MATH to access the math menu.
 RIGHT, RIGHT to access the CPX (complex) submenu.
 2 to select real(, or use arrows.
TI83/84/+/SE
2 bytes
real(z) returns the real part of the complex number z. If z is represented as x+iy where x and y are both real, real(z) returns x. Also works on a list of complex numbers.
real(3+4i)
3
Advanced Uses
The real( command is expanded by several assembly libraries (such as xLIB and Omnicalc) to call their own routines. If xLib is installed, then real( will no longer work as intended even in programs that want to use it for its intended purpose.
If you actually want to take the real part of a complex number, and want the program to work with one of these assembly libraries, you could use the imag( command instead  real(Z) is equivalent to imag(Zi). Alternatively, you could tell people using your program to uninstall xLIB or Omnicalc first.
If a program you downloaded has an error and 2:Goto takes you to a line with real( and a bunch of arguments, this is probably because the program uses Omnicalc or xLIB which you don't have installed.
Related Commands
See Also
Returns the complex argument of a complex number.
angle(z)
Press:
 MATH to access the math menu.
 RIGHT, RIGHT to access the CPX (complex) submenu
 4 to select angle(, or use arrows.
TI83/84/+/SE/CSE/CE
2 bytes
angle(z) returns the complex argument (also known as the polar angle) of the complex number z. If z is represented as x+iy where x and y are both real, angle(z) returns R►Pθ(x,y) (which is equivalent to tanֿ¹(y/x) if x is nonzero). Also works on a list of complex numbers.
angle(3+4i)
.927295218
R►Pθ(3,4)
.927295218
When writing a complex number z in the form $re^{i\theta}$ (or, equivalently, $r(\cos\theta+i\sin\theta)$), then $\theta$ is equal to the value of angle(z), suitably reduced so that the result returned is in the interval $\pi<\theta\leq\pi$.
The angle( command also works on matrices, though not in any useful way: angle([A] will return a matrix of the same size as [A], but with all elements 0. If you plan to use this, don't: 0[A] does the same thing, but is smaller and not as questionable (because this behavior is clearly unintentional on TI's part, and may be changed in an OS update).
Related Commands
Calculates the complex conjugate of a complex number.
conj(value)
Press:
 MATH to access the math menu.
 RIGHT, RIGHT to access the CPX (complex) submenu
 ENTER to select conj(.
TI83/84/+/SE
2 bytes
conj(z) returns the complex conjugate of the complex number z. If z is represented as x+iy where x and y are both real, conj(z) returns xiy. Also works on a list of complex numbers.
conj(3+4i)
34i
The conjugate of a number $z$ is often written $\overline{z}$, and is useful because it has the property that $z\overline{z}$ and $z+\overline{z}$ are real numbers.
Related Commands
Finds the greatest common divisor of two values.
gcd(value1, value2)
Press:
 MATH to access the math menu.
 RIGHT to access the NUM submenu.
 9 to select gcd(, or use arrows.
TI83/84/+/SE
2 bytes
The gcd( command returns the greatest common divisor (GCD) of two nonnegative integers. It also works on lists.
gcd(8,6)
2
gcd({9,12},6)
{3 6}
gcd({14,12},{6,8})
{2 4}
Advanced Uses
A gcd( command can be nested inside another gcd( command to compare up to four numbers.
Error Conditions
 ERR:DIM MISMATCH is thrown if the arguments are two lists that don't have the same number of elements.
 ERR:DOMAIN is thrown if the arguments aren't positive integers (or lists of positive integers) less than 1E12.
Related Commands
See Also
.