Dec  27 —  Mr Dino was made a site moderator due to his commitment and dedication to the forum 
Determines whether an input is a number or list.
Ans  the number or list to examine
Ans  1 if the input is a number, 0 if it is a list (see criteria below)
TI83/84/+/SE
Zeda
As long as Ans is always contains more than one element and the second element is not twice that of the first, this will determine if Ans is a list or not:
Ans(2)=2Ans(1
If Ans is a number, this will always return 1, else if it is a list meeting the above criteria it returns 0.
Dec  12 —  burr redesigned the main homepage to complement the respective calculator homepages 
TIBasic Developer (TIBD) covers how to make TIBasic programs using the many different TIBasic commands, while discussing proper programming design and showing several techniques that can be incorporated into programs. After going through all of the information, it is hoped that the reader becomes a competent TIBasic programmer.
The site is currently split up into three separate sections based on the version of TIBasic that is used in the different TI graphing calculators — the TI83, 68k, and TINspire series. It is recommended that you have one of those calculators, so that you can actually use the information contained in that section of the site.
Site Content
We've tried to create a broad base of TIBasic information. This ensures that most readers will hopefully be able to learn something from this site. Experimentation is encouraged to fully digest all of the information. The site content can be broken up into six general, interdependent parts:
 Preparation — Before starting TIBasic programming, you should understand the difference between TIBasic and Assembly, learn about the different TI calculators, and how to use them.
 Commands — The commands are explained in thorough detail, including their description, syntax, and different uses. The commands are also grouped together based on their function and purpose.
 Design — The design teaches how to succeed at programming, including improving program design and optimizing using the different commands. It will help the reader become a more complete programmer.
 Techniques — The techniques are a collection of short routines, broken down and dissected to help the reader understand the underlying logic. They are not designed to be comprehensive, but rather a foundation which the reader can build upon.
 Experimentation — The experimentation tests your comprehension of the commands, design theory, techniques, and the rest of the information on this wiki. There are review exercises, project challenges, and sample programs and games that you can try out to learn from and just have fun with.
 References — The references are a collection of lists on different subjects, including tutorials and tools available elsewhere on the Internet, the tokens, error conditions, file extensions, and key codes used by the calculator, and the common terminology that is used in the TI community.
Each reader can read the information in whatever order they desire. For the average reader, though, the suggested approach is to just start from the beginning and read until the end. The information is presented in a sequential order, with the concepts and code getting increasingly more complex as you get further into it. You might also look at the page Using This Guide, which outlines another suggested reading order.
Site Goals
The main goal of this site is to teach TIBasic programming. This site is targeted primarily at the beginner programmer (those with little or no programming experience), but it has information for almost everyone. We believe that if you can teach a beginner programmer good programming habits and skills, they will incorporate those habits and skills into the programs they create. The result will be higher quality TIBasic programs.
Related to the first goal, the second goal of this site is to be the nexus for TIBasic information. There are many different design concepts and techniques to learn and master, which are all part of the rich heritage of TIBasic. Unfortunately, when programmers leave the TI community, they often forget to write down their programming innovations, and that information gets lost to the community. We encourage all programmers to contribute their TIBasic knowledge to the community to prevent this from happening.
The third goal of this site is to present TIBasic in a more connected and beginnerfriendly format. The TIBasic information is spread out across several TI forums, sites, and among individual tutorials and guides, and this problem is made even worse because of how cumbersome and confusing the information is presented. For a beginner TIBasic programmer, it is especially hard to read through and follow. The result is a challenging barrier for learning TIBasic.
The last goal of this site is to create more TIBasic programming documentation. The one major underdeveloped area in the TI community is quality documentation. We believe that this is because writing tutorials is not really a fun activity, and it does not receive the same recognition as creating a program or game. Nonetheless, documentation is essential to the success of the TI community.
author: 'Jason Pavlik'
description: 'pick which piece of info you have for the photon your studying and enter the value. remember to enter info like nanometer as E9. '
arcade: '0'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
image: '/archives:photonlamdanuenergymasscalculator/SCREEN01.BMP'
download: PHOTON.8xp
size: '4'
unit: '2'
The development of a program is essential to its ability to succeed and be good. The development is a cycle that can be repeated as many times as desired, each time making a new version. This cycle will allow you to make your program usable, efficient and clean. Here is a list of the parts of the development cycle:
author: SuperchuFrostbite
description: "The Classic arcade game….. now for Ti! \nnot sure how to upload pictures, if it runs on 83, how to fix all the bugs… etc. please comment and/xor rate!"
arcade: '1'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '1'
image: '/archives:asteroids/PIC3.JPG'
download: ASTEROIDS.zip
size: '3809'
unit: '1'
author: 'Superchu Frostbite'
description: 'A simple reflex game where a key code is generated on the screen. Push the correct key before you run out of time. A great way to learn the key codes.'
arcade: '1'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '1'
image: /home/no_image_2.png
download: KEYGAME.zip
size: '268'
unit: '1'
Jun  05 —  burr redesigned the homepage for the TI83 section of the site 
_Abe_ is working on a futuristic RPG with several abilities and a unique style of battle called Endland.
The game features a dynamic inventory system, a graphical overworld and battle engine, and supports standard RPG stuff.
builderboy is working on an RPG style platform game set in space called Serenity.
The storyline involves you captaining a cargo ship, traveling through space carrying unknown Government cargo, when your ship is attacked by space pirates! Now you will need to explore the bowels of their ship, fight off enemies, and gain special items, so you can finally escape.
This is a virtual pet on your calculator. It will challenge your efforts to keep it alive, healthy and happy!
You slide until you hit an object on the board. The game includes 16 builtin levels and a custom level editor for endless hours of fun.
This version of snake is extremely fast and efficient, and is unique because it doesn't use any list variables to control the movement of the snake.
A custom menu with up to 9 switchable pages.
Str1Str9  one string per page
A  Number of pages the menu includes
B  the page they're on
X  the # choice they made
Ans, B, C, D, X, Str#
TI83/84/+/SE
Mr Dino
:1→B
:While 1
:If B=1:Str1
:If B=2:Str2
:If B=3:Str3
:If B=4:Str4
:If B=5:Str5
:If B=6:Str6
:If B=7:Str7
:If B=8:Str8
:If B=9:Str9
:ClrHome
:Output(1,1,Ans
:length(Ans)/16
:If fPart(Ans
:1+iPart(Ans
:Ans→D
:2→X
:Repeat C=24 or C=26
:Output(X,2,">
:Repeat Ans
:getKey→C
:End
:If Ans=21
:Then
:X1→X
:Return
:End
:Output(X,2," " // space
:X(Ans=25)+(Ans=34→X
:2(X>D)+D(X≤1)+X(X≤D and X>1→X
:max(1,min(A,B+(C=26)(C=24→B
:End
:End
To use this code, store an integer to A 10 representing the number of pages that will be in your menu. It will use all strings Str1StrA. Next, store the menu pages into the strings. They will be shown with 'Output(1,1,StrA)', so make sure that the menu looks right before using it. Make sure there are 16 characters in each line (starting with the title). Use spaces to make the words fit right, and you should probably test it to make sure it works. There should probably also be something in the title that signifies what page you're on. Finally, run the code as a subprogram.
Here's how it works:
B represents what page number it's on, so we start off by storing 1 to B to put us on page 1. Then we have a While 1 loop to manage page changes. Based on the value of B, it will put one of the strings into Ans. It will output Ans onto the home screen, then determine how many rows are in the menu and store that to D. And the user will always start out on option 1  row 2 (because of the title screen).
Now we start the choice loop: We display the cursor, then wait for a keypress. If the use presses [2nd], we subtract 1 from X (for the offset from the title) and Return back to the parent program, with B as the page number and X as the choice number. But if not, it continues: The cursor is erased, X and B are changed according to the keypress, and if the use changed the page, it exits the choice loop and enters the page loop where it displays the new page and sets up for another choice loop.
Error Conditions
It won't work properly if A isn't an integer within the bounds 19 or if the strings don't represent the menu pages correctly.
 ERR:UNDEFINED is thrown if you don't define the strings.
Related Routines
There are several routines that are similar in functionality or are used in a similar context. Make a bulleted list of them, with links to the other routines' pages. It will often be the case that several routines all link to each other.
Welcome to TIBasic Developer (TIBD), the premier source for TIBasic information! If you are a firsttime visitor, please check out the welcome pack to get you up to speed on using the site. We encourage you to become a member and to get involved in the community, and to come back often to see what changes have occurred. And above all else, enjoy your stay! 


Moderator
Apr  25 —  Xeda Elnara was made a site moderator due to her commitment and dedication to the forum 
Apr  10 —  TI Story has moved to its own wiki — http://tistory.wikidot.com 
Feb  01 —  burr started a new section of the site called TI Story for documenting the TI community history 
This article is under construction and needs to be completed. You can help by expanding it.
Filename
Summary
Authors
Site URL
Ticalc.org URL
Release Date
Compatibility
Language
Product Intro
Product Screenshot
(Screenshot of Product)
Significance of Product
 Why product was important to TI community
 Any controversy or interesting circumstances surrounding product
 Awards won, fond memories that people have
Documentation
 How to use the product
 Can copy the author's readme file (if available)
Development History
 A chronological overview of the product's development
Miscellaneous
Related Products
This article is under construction and needs to be completed. You can help by expanding it.
Editing this page is currently blocked. Please use the discuss link at the bottom to suggest any changes that you would like to make.
TI Story has moved to its own wiki located at http://tistory.wikidot.com — please change your links accordingly.
Asks for a string in a dialog box.
Request promptString, var
Menu Location
Starting in the program editor:
 Press F3 to enter the I/O menu.
 Press 1 to enter the Dialog submenu.
 Press 2 to select Request.
This command works on all calculators.
? bytes
On its own, the Request command asks for a string in a dialog box, while showing the prompt string to its left. It can also be used inside a Dialog..EndDlog block, to add a line of text to a more advanced dialog.
The text must be a single string, but you can build one out of smaller strings and other data types using the & and string() commands.
Request will give an error if the string is too long — how long varies from model to model, and depending on if text is being used inside or outside Dialog..EndDlog, but in general anything below 30 characters is safe (otherwise, you should test the dialog first to make sure everything fits). It uses the small, variablewidth font on the TI89 and TI89 Titanium, and the normal fixedwidth font on widescreen calculators.
Advanced Uses
You can add 0 as a third argument for the calculator to turn off alpha lock when typing text, but all Request commands in a dialog box must have the same alphalock setting. The setting can be used to ask for a number, using expr() as well.
Error Conditions
130  Argument must be a string happens when Text is used to display other data types without using string() first.
230  Dimension happens when the line of text is too long to fit in a dialog box.
Related Commands
See Also
Executes a string of assembly opcodes.
:Exec string [, expression1] [,expression2]…
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
? bytes
The Exec command allows you to execute assemblylanguage opcodes. The optional expressions let you pass one or more arguments for a program.
You need to be careful though. If you make a mistake, then you could lock up your calculator and lose your data.
Optimization
Error Conditions
Related Commands
author: blue_bear_94
description: 'This is a game in grayscale. Even more surprising is that it''s in pure TIBasic.'
arcade: '1'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: '/archives:grayscalebug/gbug.png'
download: Grayscale%20Bug.zip
size: '668'
unit: '1'
author: symaxian
description: 'A collection of most of the characters available on the TI, sorted by hex code and stored into Str0. Unavailable characters are represented by a "?". See http://tibasicdev.wikidot.com/83lgfont for more info.'
arcade: '0'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '1'
image: 'archives:glyphs/glyphs.png'
download: GLYPHS.8xp
size: '399'
unit: '1'
author: 'Jack Fenlin'
description: "Battery Level Indicator\nChecks Your Batteries\nIndicator program is in TIBASIC\nBattery Check program is in Assembly\nCombined size of both programs (when the assembly program had been compressed) is 262 bytes."
arcade: '0'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
image: /home/no_image_2.png
download: BatteryIcon
size: '3560'
unit: '1'
Welcome visitors and frequent lurkers! We are excited that you are on the site, and encourage you to become a member and to get involved. If you can't find what you're looking for, please leave a post in the search help thread and somebody will assist you. We hope that you enjoy using the site and stop by often!
Jan  27 —  burr added a new game (mastermind) to the games page. 
Mastermind is a fun game that involves trying to break a random code of five numbers (19) in fifteen guesses or less. To help assist you with the codebreaking, a clue is displayed below each number. If the number is correct and in the right position, a star (*) will be displayed. If the number is correct but in the wrong position, a plus (+) will be displayed. And if the number is simply wrong, a minus () will be displayed. Try out the game and try to understand and think through the code.
The Code
:randInt(1,9,5→L1
:For(X,1,15
:0→dim(L2
:Repeat Ans=105 and 5=dim(L2
:ClrHome
:For(Y,1,dim(L2
:Output(1,Y,L2(Y
:End
:Repeat Ans
:getKey
:End
:If Ans=22
:Goto Q
:If Ans=45
:ClrList L2
:If Ans=23 and dim(L2
:dim(L2)1→dim(L2
:If 5>dim(L2) and 2>abs(5abs(5abs(Ans83
:263int(.1Ans)+10fPart(.1Ans→L2(1+dim(L2
:End
:" // 1 space
:For(Y,1,5
:Ans+sub("+*",1+max(L2(Y)=L1)+(L2(Y)=L1(Y)),1
:End
:Output(2,1,sub(Ans,2,5
:rand(E2 // scientific E ([2nd][,])
:If not(min(L2=L1
:End
:Disp sub("FAIL!WIN! ",1+5(X<16),5
:Lbl Q
Related Games
Draws a triangle on the graph screen.
L1  Xcoordinates of 3 vertices
L2  Ycoordinates of 3 vertices
S  Whether it is shaded
D  draw if 1, erase if 0
L1, L2, S, D, M, N, B, C
TI83/84/+/SE
:If S
:Then
:SortA(L1,L2)
:If L1(2)≠L1(1)
:Then
:(L2(2)L2(1))/(L1(2)L1(1))→M
:L2(1)ML1(1)→B
:(L2(3)L2(1))/(L1(3)L1(1))→N
:L2(1)NL1(1)→C
:For(I,L1(1),L1(2),ΔX)
:Line(I,MI+B,I,NI+C,D)
:End
:End
:If L1(2)≠L1(3)
:Then
:(L2(3)L2(2))/(L1(3)L1(2))→M
:L2(3)ML1(3)→B
:For(I,L2(2),L1(3),ΔX)
:Line(I,MI+B,I,NI+C,D)
:End
:End
:Else
:Line(L1(1),L2(1),L1(2),L2(2),D)
:Line(L1(1),L2(1),L1(3),L2(3),D)
:Line(L1(2),L2(2),L1(3),L2(3),D)
:End
This is a routine to draw a shaded triangle, with an option to draw an unshaded triangle too.
Error Conditions
 ERR:DIM MISMATCH is thrown if L1 and L2 have different dimensions.
Related Routines
Turns the stat wizard off.
STATWIZARD OFF
Press:Catalog,
 2nd CATALOG to enter the command catalog
 T to skip to command starting with T
 Scroll up to STATWIZARD OFF and select it
TI84/+/SE 2.55 MP
2 bytes
The STATWIZARD OFF command disables the use of the Stat Wizard, added in 2.55MP, for statistic and distribution commands as well as seq(.
Advanced
Formulas
Error Conditions
Related Commands
Turns the stat wizard on.
STATWIZARD ON
Press:Catalog,
 2nd CATALOG to enter the command catalog
 T to skip to command starting with T
 Scroll up to STATWIZARD ON and select it
TI84/+/SE 2.55 MP
2 bytes
The STATWIZARD ON command enables the use of the Stat Wizard, added in 2.55MP, for statistic and distribution commands as well as seq(.
Advanced
Formulas
Error Conditions
Related Commands
author: 'bsch2734/ Lavalamp Gaming'
description: 'The classic game of Mastermind. The calculator selects a fourdigit code. Given a few hints, can you geuss it in 10 tries?'
arcade: '0'
graphics: '0'
platform: '0'
puzzle: '1'
rpg: '0'
strategy: '1'
sports: '0'
casino: '0'
board: '1'
utility: '0'
misc: '0'
image: '/archives:mastermind/Screenshot.BMP'
download: MSTR5MND.zip
size: '2811'
unit: '1'
author: Programmingfreak
description: 'A simple game related to the old Galaga, played all on the home screen.'
arcade: '1'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: /home/no_image_2.png
download: StarSmash.zip
size: '8'
unit: '2'
Converts an angle measure to radians, if necessary.
angle▶Rad
Menu Location
 Press 2nd MATH to enter the MATH popup menu.
 Press 2 to enter the Angle submenu.
 Press B to select ▶Rad.
This command requires a TI89 Titanium or Voyage 200 calculator with AMS version 3.00 or higher.
The ▶Rad command is used to convert both degrees and gradians into radians. (If the command is given a value in radians it returns that value unchanged).
If you do not specify what unit you want to be used (using either the r command, the ° command, or the G command), whatever default the calculator's mode is set to will be used. Here are some examples:
:setMode("ANGLE", "DEGREE")
:90▶Rad
1
:90^r▶Rad
90
It appears to be equivalent to the ^{r} command, but only on the TI89 Titanium or Voyage 200.
Related Commands
With xLib grayscale is very easy and good. You might think now: Basic? Grayscale? I couldn't find a xLib command that does that? Then your right: there is not such a command. You'll have to trick a bit for it with recalling a pic very often in XORlogic, so inversion.
So you have a normal screen and a other image that is recalled in XOR often.
This is in pic 1:
Then you have this code:
:DelVar A
:Repeat A
:real(3,1,3,1,1
:getKey>A
:End
And till you press a key the screen will be like this:
Ok, as you may notice the image in pic 1 is very often recalled in XORlogic, and that seems then as grey scale.
Now some training:Try to make this sprite:
Ok, the image that inverts everything is obvious, because it is just everywhere where it is supposed to be grey:
More complicated is the image that should be displayed a the beginning. You might think of this:
It would work out, but the grey wouldn't look to good.Better is this:
because of the checked tiles it seems better to the eye, it is a optical solution.
So if you have dcs the code to display that in grey till a key is pressed would be:
:real(0,0 //clears the screen
:identity(5,"00003C3C3C3C0000",0,0,1,8,0,0,0 //draws the sprite that will invert the screen
:identity(1,1,1 //saves it in pic 1
:real(0,0 //clears the screen
:identity(5,"FF81A995A99581FF",0,0,1,8,0,0,0 //the sprite, the grey thing is checked
:Repeat Ans //repeats till something is in Ans
:real(3,1,3,1,1 //inverts the screen with pic 1
:getKey //puts the Key in Ans
:End
Bitwise operations on a decimal representation of binary data
D — the Decimal that represents the binary data
I — the Index of the bit you will check/change
Ans the checked bit or the changed decimal representation
D, I, Ans
TI83/84/+/SE
When you have a program with lots of bivalent information — for example, a RPG with open/closed doors, defeated/undefeated bosses, completed/uncompleted quests, etc. — you could store all of this data in a list. However, lists tend to become rather large, so compression is vital.
First let's have a glance at how this will work. For example, there are six locations in a RPG that a player might have visited or not, which is stored as 1 or 0, respectively. As a list, we would have something like this:
:{1,0,0,1,1,0
But if you know a thing about binary, you know that 100110b equals 38d in decimal notation (if this confuses you, please read through the binary and hexadecimal page first). We can store up to 44 "bits" of information in just one variable! The reason we can store a maximum of 44 bits in one variable is because of the internal rounding that the calculator does.
So imagine at a given moment the game needs to know if the player has been to area four. Continuing our example from above, we take the number 38 as the current value, which we know represents 100110, and for the sake of optimization we need to index this binary number as follows: 1_{5}0_{4}0_{3}1_{2}1_{1}0_{0}.
Using following routine, we extract the value of the bit with index I from its decimal representation D. In our example, I=4 and D=38
:int(2fPart(.5D/2^I
Ans will now contain the value of the bit with index I from the decimal notation D. In our example, Ans would be 0, location 4 was not yet visited by the player. Now all we need is ways to change that bit. If the player visits this location it would have to be changed to 1.
This routine deals with that, assuming Ans is the value of the flag (either one or zero, returned from the previous routine):
:D+2^Inot(Ans→D //if Ans=1, nothing needs to be changed, and 0 is added to D
//if Ans=0 it needs to become 1, so 2^I is added to D, effectively setting the bit with index I to 1
Next routine does the exact opposite: it changes the value to 0
:DAns2^I→D
Finally, the last routine changes whatever value is in the current bit: 0 becomes 1 and 1 becomes 0.
:D+2^I(12Ans→D //(12Ans) sets the sign: 1 if Ans was 1 and +1 if Ans was 0
Error Conditions
 ERR:DATA TYPE is thrown if D or I is imaginary.
 ERR:OVERFLOW is thrown if I>333 (though I shouldn't be this large with only 44 bits).
 No errors will be thrown if I≥44 or D≥2^{44}, but data will get corrupted in the lower indexes because of rounding if D is changed.
 No errors will be thrown if I<0, but D will become decimal if it gets changed.
 No errors will be thrown if I or D are not whole, but data will be corrupted.
These two routines convert binary to decimal and vice versa.
D / Str1
Ans / D
Str1, D, I
83/84+/SE
Michael2_3B / BlackPilar
Bin▶Dec
:Input "BIN: ",Str1
:Delvar DFor(I,length(Str1),1,1
:If "1"=sub(Str1,I,1
:D+2^(length(Str1)I→D
:End
Dec▶Bin
" →Str1 //1 space character
Repeat not(D
D/2→D
sub("01",1+not(not(fPart(Ans))),1)+Str1→Str1
iPart(D→D
End
expr(sub(Str1,1,length(Str1)1
DelVar Str1 //if you want to keep your binary number in the string, skip this
Bin▶Dec
The way that this function works is pretty simple, actually. First we get the user to tell us what the binary value they wish to convert is. Then we clear the variable D (making it zero by default), and being our loop, working backwards through the string. If the character is a "1", then that means that 2 (binary's base), is raised to that positions power, beginning with zero at the far left. We add the resulting power of two to our decimal value, and continue through the binary value.
Dec▶Bin
Here, we first initialize our string, which will hold the binary number until the end. D is the decimal number you want to convert. Our loop repeats itself until D=0, that way all values over 2 can be covered. Inside the loop, we divide D by 2 first. We then take the substring of "01" and add str1 after it, updating str1. The 0 in the string is selected to add if there is no remainder from D/2, and the 1 is selected if there is. After that, the integer part of D/2 is stored into D. Once everything is all done, we take the expr() of str1, excluding the last character which is the space character, putting the binary number into Ans. And of course, to clean up, we delete variable Str1.
Error Conditions
 ERR:OVERFLOW is thrown in Bin▶Dec if the resulting decimal will be greater than 9e99.
Related Pages
There should be more of the list on the screen at once.
http://tibasicdev.wikidot.com/catalog
Glossary
The pros and cons could use expanding.
http://tibasicdev.wikidot.com/basicbuilder
Reference;Assembly
Probability functions are helpful for generating random numbers, and provide an element of variability in many calculator games. Examples include an asteroid game where you avoid a random map of asteroids with your ship while crossing the screen, and RPGs where opponents need to have slightly unpredictable power in their attacks.
Key Commands
The main commands to use in random number generation are rand and randInt(. By itself, rand generates a decimal number between 0 and 1. This number can be manipulated like any other number, making it very easy to set up a random event. Lets say you want to randomize the description of a character's death in an RPG. You want to say that the dragon ate him half the time, and that the dragon burnt him to a crisp the other half. This is how you could do that with rand.
:"The dragon ate him
:If int(2rand
:"The dragon burned him
:Output(1,1,Ans
This works because doubling the rand command gives you a number between 0 and 2. If rand is less than .5, it will be doubled to between 0 and 1 and converted to 0 as the integer side is empty. If the number is greater than .5, it will be converted to 1 by int(. Notice that because there is only one possible outcome where the random number is a positive integer, you don't need to check if it is exactly one. We'll show you in a minute how to generate lists with rand as well.
randInt( is useful for doing the same thing as above but in a more visually simple manner. Instead of needing to convert a random decimal to integers, the calculator does the work for you. It takes either 2 or 3 arguments. The first two are the minimum and maximum, and optionally you can add a third to create a list of integers. To create a list of 20 dice rolls, the code would be like this:
:randInt(1,6,20
The same can be accomplished with rand, albeit in a more complex manner. The rand command can create lists when you add parenthesis and an argument for the size of the list.
:1+int(6rand(20
<< Powers and Exponentials  Table of Contents  Trigonometry >> 
There are several ways to manipulate complex numbers in the context of calculator programming. This lesson will look at how complex numbers work, the commands associated with them, and a simple application for the commands.
What are they?
A complex number is essentially what happens when you attempt to take an even root of a negative number. As a way of interpreting complex numbers, they are displayed as their rational part added with a multiple of the square root of 1. This second number is known as an imaginary number, because you cannot represent them on a normal coordinate graph. The square root of 1 is denoted as a lowercase i. This is what it usually looks like:
:5+6i
real( and imag(
The real( command is used to extract the first part of a complex number. Simply use the command like this:
:real(5+6i
This code will return the number 5 extracted from the complex number 5+6i. That's all there is to it.
The imag( command is used to extract the second part of a complex number, the imaginary part. It is used in the same way real( is.
:imag(5+6i
This will return the coefficient of i, which is 6.
Application
The main use of real( and imag( in programming is to compress 2 real variables into one complex variable. For instance, if you want the variable A to contain both the values of B and C, you can use the following code.
:B+Ci→A
To extract the independent values, use the real( and imag( commands you just learned about.
However, there is one small problem. Two real variables take up 36 bytes, but complex variables take up 27 bytes. This is only a compression of 9 bytes, and using the similar integerdecimal method saves you 18 bytes. But you can use both the integerdecimal method combined with the realimaginary method to store 4 different variables in one, saving you a whopping 45 bytes of storage!
<< Trigonometry  Table of Contents  Summary >> 
Performs the operation "n choose r" using n and r.
nCr(expr1,expr2)
Menu Location
[Math][Probability][3]
This command works on all calculators.
This performs the operation "n choose r" where expr1 is n and expr2 is r.
:nCr(3,0)
Formulas
The formula used to obtain the result is:
(1)This is often referenced with Pascal's Triangle and binomial expansion as well as many areas of mathematics.
Related Commands
Clears the program IO screen
Use on the homescreen or in a program. Invalid in a function.
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
2 bytes
This is used to clear the IO buffer (not the home screen). The IO buffer is where any Output(), Disp, Pause, and any other commands that use the I/O buffer display results.
:ClrIO
:Disp "Hello"
Related Commands
Used to create random lists
randIntNoRep(start,end)
[Math][left][8]
OS 2.53MP and TI84+/SE
2 bytes (EF35h)
randIntNoRep( is used when you need to create a list of numbers in random order in which no integer is repeated. This command is useful for things such as simulating decks of cards. Commonly, before this command was introduced, the following code would shuffle a deck:
rand(52→L₂
seq(X,X,0,51→L₁
SortA(L₂,L₁
This result can now be achieved with the following code:
randIntNoRep(0,51→L₁
Advanced Uses
seed→rand affects the output of randIntNoRep(
What this does is quite simple. When you seed rand, then the next time you use randIntNoRep(, you will get a result that will be fairly random, but the same on all calculators. This allows several things to be possible, including password protection and encryption. For example, if you were to use the following code, you could encrypt and decrypt messages only if you use the same encryption value. In this example, Str1 contains the message:
Decode:
"ABCDEFGHIJKLMNOPQRSTUVWXYZ .!,0123456789→Str2
Input "CODE:",A
A→rand
randIntNoRep(1,length(Str2→L1
length(Str1→B
".
For(A,1,B
Ans+sub(Str2,sum(cumSum(L1=inString(Str2,sub(Str1,A,1)))),1
End
sub(Ans,2,B
Encode:
"ABCDEFGHIJKLMNOPQRSTUVWXYZ .!,0123456789→Str2
Input "CODE:",A
A→rand
length(Str2→C
randIntNoRep(1,Ans→L1
length(Str1→B
".
For(A,1,B
Ans+sub(Str2,L1(C+1inString(Str2,sub(Str1,A,1))),1
End
sub(Ans,2,B
The output strings are in Ans
Related Commands
A short description of what the command does.
setFold(foldername)
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
X byte(s)
This command is used to set the current folder. The folder must exist, otherwise the function produces an error. This is a way around this error:
:example()
:Prgm
:Try
:setFold(fold1)
:Else
:ClrErr
:NewFold(fold1)
:EndTry
Advanced Uses
If you are changing the current folder, but want to set it back later, the getFold() command is not required to store the old folder name.
For example:
:foldset()
:Prgm
:Local a
:getFold()→a
:setFold(fold1)
...
:setFold(#a)
:EndPrgm
does the same thing as
:foldset2()
:Prgm
:Local a
:setFold(fold1)→a
...
:setFold(#a)
:EndPrgm
Error Conditions
420  Invalid Folder Name happens when the folder does not exist.
Related Commands
Routine Summary
This routine uses the PxlHorz function to invert the graph screen.
Inputs
None
Outputs
The graph screen is inverted as a result of this program.
Variables Used
i  a counter variable
size  the size of the graph screen window in pixels
All of these are locally declared.
Calculator Compatibility
TI89/92/+/V200
:invert()
:Prgm
:Local i,size
:when(getConfg()[10]=160,76,102)→size
:For i,0,size
: PxlHorz i,1
:EndFor
:EndPrgm
The 1 at the end of PxlHorz is a flag that tells the system to invert all pixels along the line. I chose PxlHorz because this requires less lines to be drawn than PxlVert does.
Error Conditions
None
Another important class of math functions deals with powers, logarithms, and exponents.
^ operator
This operator, found on the keyboard, is the exponent operator. It will raise a number to a power.
^{1}, ^{2}, ^{3}
These are shortcuts for the reciprocal, square, and cube of a number, respectively. ^{1} and ^{2} can be found on the keyboard, while ^{3} can be pasted by pressing MATH, 3.
Logarithms: log(, ln(
The log( and ln( functions, both available from the keyboard, will calculate the logarithms to base 10 and base e, respectively.
To get logarithms to other bases, use the following formula:
:log(x)/log(b)
where b is the desired base.
A useful use of log( is to determine how many digits an integer has. An integer n will have
:int(log(abs(n)))+1
digits in base 10.
10^(, e^(, E
These functions can be found on the keyboard, by pressing 2nd plus the respective logarithm key. Of course you could always type these out one character at a time, but using shortcuts takes less bytes. The E (EE on the keypad) denotes and integer power of 10, and is commonly used for scientific notation. E cannot be used with variables or fractional exponents, but it is about twice as fast as 10^(.
Roots: √(, ³√(, ˣ√(
These functions take the square root, cube root, and nth root of a number, respectively.
:5ˣ√(2)
will give the same result as
:2^(1/5)
namely, the 5th root of 2.
<< Numbers Menu  Table of Contents  Probability >> 
Inputs
string  A string
Outputs
The reversal of the input string, or an empty string if the input is not a string.
Variables Used
s, temp, i
All are created locally in the program.
Calculator Compatibility
TI89/92/+/V200
:reverse(s)
:Func
:Local i,temp
:""→temp
:If getType(s)=getType(temp) Then
: For i,1,dim(s)
: mid(s,i,1)&temp→temp
: EndFor
:EndIf
:EndFunc
This function requires the user to enter a string as an argument. Many would object that a "return" is needed at the end. This is not true, because, if there is no "return" statement, the calculator automatically returns the last value that it calculated.
Error Conditions
None
setDate(year, month, day)
Menu Location
This command can't be found in any menu besides the command catalog.
This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI89 Titanium or Voyage 200 calculator)
This command sets the calculator's date to whatever is specified in the command. The year must fall in the range 1997 to 2132 for this command to work.
:setDate(2001, 10, 31)
: {2001, 11, 1}
The above example has set the calculator's date to October 31^{st}, 2001, and the date it was set at originally was November 1^{st}, 2001.
Error Conditions
40  Domain error happens when the year is outside of the range of 1997 to 2132, or the month is above or below 0 to 12, or the date is above or below 0 to 31.
Related Commands
Converts seconds into a list containing days, hours, minutes, and seconds.
dayOfWk(seconds)
Menu Location
This command can't be found in any menu besides the command catalog.
This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI89 Titanium or Voyage 200 calculator)
This command converts a number of seconds into a list containing {days, hours, minutes, seconds}.
:timeCnv(152442117)
: {1764 9 1 57}
The above example has converted 152,442,117 seconds into 1764 days, 9 hours, 1 minute, and 57 seconds.
Advanced Uses
This command can be used to easily convert the output of the startTmr() or the checkTmr() commands to a more readable and understandable format.
Related Commands
Returns an integer from 17 that shows what day of week it is for a specific date.
dayOfWk(year, month, day)
Menu Location
This command can't be found in any menu besides the command catalog.
This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI89 Titanium or Voyage 200 calculator)
The dayOfWk command returns an integer from 1 through 7 which shows what day of the week it was on a certain date. The Ti89 Titanium manual says that this function may not give accurate results for years prior to 1583 (preGregorian calendar).
Integer value:  Day of the week: 

1  Sunday 
2  Monday 
3  Tuesday 
4  Wednesday 
5  Thursday 
6  Friday 
7  Saturday 
:dayOfWk(1948,9,6)
: 2
:dayOfWk(1600,1,15)
: 7
The above examples find that September 6^{th},1948 was a Monday and that January 15^{th}, 1600 was a Saturday. It also works with future dates, in case you want to use that in a program.
Related Commands
Mar  23 —  By today, 167 out of 366 command pages have been written in the command index! There's only 16 more to halfway! 
Forms a new picture out of a n x 2 matrix.
NewPic matrix, picVar[, maxRow][, maxColumn]
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
This command forms a new picture from a matrix. The matrix must have only 2 columns, and should contain as many rows as there are "on" pixels (darkened pixels) in the image. If the picture variable specified already exists, this command will overwrite it. This command takes each row of the matrix, and forms pixel coordinates from the two numbers there. The optional arguments maxRow and maxColumn specify the boundaries of the picture, so this is a good way to form a small sprite from a matrix.
:newPic [1,1;2,2;3,3;4,4;5,5], picline
The above code would form a picture named "picline" which would have pixels at (1,1),(2,2),(3,3),(4,4), and (5,5), which would basically be a straight line.
Error Conditions
260  Domain error happens when an element of the matrix is outside the screen range..
230  Dimension error happens when The matrix has more or less then 2 columns..
Related Commands
See Also
Stores a picture variable at [PxlRow, PxlColumn] with [width, height]
StoPic picVar,[PxlRow, PxlColumn][,width, height]
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
This command is used to store a picture that is on your calculator's graphscreen. This is useful for sprites in programs, where you can draw a sprite and save it to a picture that you can later redraw on a background. It is also useful for saving a copy of whatever you are drawing, so that it is not accidentally deleted if you graph something… The row and column arguments specify where on the graphscreen should be stored. Also the width and height arguments specify how tall or wide the stored area should be. The default for the row and column is (0,0), which is the top left corner of the graphscreen. The default width and height is the whole screen.
:StoPic 2a, 2,7,10,10
The above code would take a 10 x 10 square of the graphscreen with the top corner being at (2,7), ans it would store whatever is there to the picture variable "2a".
Error Conditions
260  Domain error happens when the [row][,column] argument is outside the screen range..
Related Commands
See Also
Displays picture variables in a cycle for a given amount of time per picture.
CyclePic picNameString, number of pictures [[,wait][,cycles][,direction]]
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
This command displays several picture variables in a cycle, with each picture getting an optional wait time, number of cycles, and the direction to display the pictures in. For instance, if you have saved 5 pictures: pic1, pic2, pic3, pic4, pic5, then you could do this to display them all: CyclePic "pic", 5, 3, 2, 1. This would display all 5 pictures for 3 seconds each, for 2 cycles, and backward, meaning it would display picture 5 first…
:CyclePic "ham", 3, 1.5, 6, 1
The above code would display pictures "ham1", "ham2", and "ham3" in that order for 1.5 seconds each, and for 6 cycles.
Advanced Uses
This command can be used to create a handy slideshow style program, or it can be used to display a sprite so it looks like it is moving.
Error Conditions
960  Undefined variable happens when the picture variables specified do not exist..
Related Commands
Replaces whatever is on the graphscreen with a picture variable at [row][, column]
RplcPic picVar,[row][, column]
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
This command replaces whatever is on the screen at a specific spot ([row][,column]). If no row or column is specified, the default is the upper left corner (0,0). If the picture is less than the full screen, only the spot at which the picture is placed will be removed. If you do not want anything replaced, use RclPic instead…
Error Conditions
260  Domain error happens when the [row,column] argument is outside the screen range..
960  Undefined variable happens when the picture variable specified does not exist..
Related Commands
See Also
Logically "xors" a picture variable and the graph screen at [row][, column]
AndPic picVar,[row][, column]
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
This command logically takes the picture variable specified, and takes the current graph, and it finds the points at which only the graph or only the picture have pixels, but turns off the points at which both have pixels, and it displays them only. If specified, [row,column] tells where the top left corner of the picture is to be placed. If not specified, the default is (0,0), which is the top left corner of the screen.
Error Conditions
260  Domain error happens when the [row][,column] argument is outside the screen range..
960  Undefined variable happens when the picture variable specified does not exist..
Related Commands
See Also
Logically "ands" a picture variable and the graph screen at [row, column]
AndPic picVar,[row, column]
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
The AndPic command logically takes the picture variable specified, and takes the current graph, and it finds the points at which both the graph and the picture have pixels, and it displays them only. If specified, [row,column] tells where the top left corner of the picture is to be placed. If not specified, the default is (0,0), which is the top left corner of the screen.
Error Conditions
260  Domain error happens when the [row,column] argument is outside the screen range..
960  Undefined variable happens when the picture variable specified does not exist..
Related Commands
See Also
Returns the name of the current folder.
getFold()
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
This command returns the name of the current folder as a string. This will usually return "main", as main is the default folder for your calculator. It is used to check which folder you calculator is in while you are inside a program.
:getFold()
: "main"
Related Commands
This command turns on all or a group of functions.
FnOn [optional function numbers]
Menu Location
 Press F4 from the Homescreen to enter the OTHER menu.
 Press 7 to select the FnOn command.
This command works on all calculators.
The FnOn command turns on one or a group of functions. The optional argument specifies which functions are to be turned on, and if there is no argument, then all the functions are turned on, not just the specified functions. This is used mostly to turn back on functions after they are turned off by the similar FnOff command, or it is used to turn back on functions after a program that has used the graphscreen.
:FnOff
:FnOn 4,7,9,20
The above code will turn off all functions, and then it will turn on only functions 4, 7, 9, and 20. This is useful if you want to graph only a few functions, but still have the rest of the functions stored in the calculator.
Error Conditions
260  Domain error happens when the optional function argument is not in the range 199.
Related Commands
Truncates a number to a specified number of decimal places.
round(value[,number of decimal places to round to])
Menu Location
 Press 2nd MATH to enter the MATH popup menu.
 Press 1 to enter the Number submenu.
 Press 3 to select round(.
This command works on all calculators.
1 byte
The round command takes whatever value you give it, and it rounds the value to a given number of decimal places. For instance round(9.7,0) will return 10, since rounding to 0 decimal places will return the closest whole number. Another example would be if you entered round(5.46338,3) which would return 5.463, since it rounded 5.46338 to 3 decimal places. The round function can round 0 to 12 decimal places, and if you enter a value outside that range, you will get a domain error. Strangely enough, if you enter an imaginary number into the round() command, nothing happens and the calculator returns the same function in a simplified form.
:round(99.35847475,5)
: 99.35847
:round(4.392i,2)
: round(4.392*i,2.)
:round(2.348972,2i)
: round(2.348972,2*i)
Unexpected results
Your calculator may also round, say for instance if you do this:
:round(2.4573485645,11)
If your calculator is set to float or to fix at 10 or less, the calculator will round the number that comes out of the function. The function above should return 2.4573485645, since that is less than 11 digits, but if your calculator is set to "Float 6" it will return 2.457349 instead of what you expected.
Error Conditions
260  Domain error happens when the number of decimal points to round to is not in the range 012.
Related Commands
Returns the current date set on the calculator and returns it in list format.
getDate()
Menu Location
This command can't be found in any menu besides the command catalog.
This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI89 Titanium or Voyage 200 calculator)
3 bytes
The getDate() command checks the date that the calculator is set to, and then returns it in a list format. The list will always be in the format {year, month, day}. To change this list to another format, you can use the closely related getDtStr() option, which just returns the date in a string format, not as a list. The setDtFmt() command does not work on this command, but it will change the format that the calculator returns the getDtStr() command as.
For example, if the calculator's date was set to March 14th, 2011, the getDate() command would return the following:
:getDate()
: {2011 3 14}
Related Commands
Mar  16 —  New technique added (text wrapper) A simple text wrapper has been added and can be viewed here. 
Wraps text on the screen whenever you want. (Preserves space functionality.)
Str1/Ans — String to wrap
Text on screen
R, C, I, Str1, Ans
TI83/84+/SE
BlakPilar
Code (Graph Screen)
:"YAY, I MADE A LINEºWRAPPER FOR (ALMOST)ºANY LENGTH OF TEXT!º =D→Str1
:ClrDraw
:DispGraph
:DelVar RDelVar CFor(I,1,length(Str1
:If C<91 and "º"≠sub(Str1,I,1
:Then
:If " "≠sub(Str1,I,1
:Text(R,C,sub(Str1,I,1
:C+4→C
:If I<length(Str1)1:Ans2(" "≠sub(Str1,I,1→C
:Else
:DelVar CR+6→R
:End
:C+4(C>89→C
:I(C>89→I
:End
Explanation (Graph Screen)
NOTE: The string declaration can easily be changed to "Ans→Str1" as long as you are 100% certain that Ans will be a string.
The first two lines after the string are selfexplanatory (I hope). We first need to store zero to R and C (this is done by using DelVar), which will be used as our row and column variables. We then start a loop which will only execute while in the string.
The first If statement that we encounter checks for our new line character, which in this case is used as the degree sign (2ND+APPS>1). If the current character is not our new line character, and it is not a space, we display it and add 4 to our column variable.
With our third If statement, we check to see if we are still in the string. If we are, and the next character is a space, we subtract two from the column variable. The number 2 can be changed to whatever you want the word spacing to be (TIOS default is 1).
Finally, we reach our Else, which is what will happen if the current character is the new line character. All we do is reset the column, and add six to the row (again, the number 6 can be easily changed for line spacing). Simple as that!
Note, this will also wrap text in case you forget the new line character.
Code (Home Screen)
:"WOOT, NOW IT'S A LINEºWRAPPER FOR THE HOMEºSCREEN! =]→Str1
:ClrHome
:1→R:1→C
:For(I,1,length(Str1
:If C≠17 and "º"≠sub(Str1,I,1
:Then
:Output(R,C,sub(Str1,I,1
:C+1→C
:Else
:I(C=17→I
:1→C:R+1→R
:End
:If R=9:Stop
:End
Explanation (Home Screen)
NOTE: As with the graph screen version, the string declaration can easily be changed to "Ans→Str1" as long as you are 100% certain that Ans will be a string.
This isn't that different from the graph screen version. We just have to keep in mind that the home screen only has an 8x16 dimension and is monospaced (each character is the same width and height), so we need to adjust our variables accordingly. The row can have a max of 8, and the column can have a max of 16. Each's minimum is 1.
As we display text, we check to see if the current character is our new line character. If it isn't, then we go through our displaying. If it is, then we change our variables.
author: 'Zeda E.'
description: 'This is my version of TicTacToe that includes options to go against the calculator… be ware, the calc can be pretty good. For a challenge, try playing as O.'
arcade: '0'
graphics: '0'
platform: '0'
puzzle: '1'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: '/archives:tictactoewithai/TTT.GIF'
download: TTT.zip
size: '819'
unit: '1'
author: 'Zeda Elnara'
description: 'Math Attack! is a "game" I made two years ago but I never released it. All it is meant to do is stretch your brain by quizzing you on basic math.'
arcade: '0'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '1'
image: '/archives:mathattack/MathAttack.gif'
download: MathAttack.zip
size: '1103'
unit: '1'
Scales window settings relative to pixel length and height
ZFracX
[Zoom][Alpha][Apps]
OS 2.53MP+
2 bytes
ZFracX refers to a collection of Zoom commands in for the OS 2.53MP and up. The calculator boasts six such commands, each replacing X with a fraction of some sort. The commands all essentially operate in the same manner, so they are all covered here on this page.
This command centers the origin of the graph and makes each pixel X units tall and wide where "X" refers to the suffix of the command. For example, ZFrac1/3 makes each pixel a length of and height of 1/3, which means that each square unit would be a 3x3 square of pixels. It also sets Xscale and Yscale to 1.
It is useful when the users wants each pixel to be a uniform length and height, though other commands such as ZSquare, ZDecimal, and ZInteger also create a friendly window, and being more compatible, they would be more useful in programming across calculators.
The following is a list of the available ZFracX commands:
 ZFrac1/2
 ZFrac1/3
 ZFrac1/4
 ZFrac1/5
 ZFrac1/8
 ZFrac1/10
Related Commands
Puts Quadrant 1 in the viewing window.
none
[Zoom][Alpha][Math]
OS 2.53MP and above
2 bytes
ZQuadrant1 was introduced in OS 2.53MP. As it's name might imply, it puts Quadrant I in the viewing window (the upperleft quadrant). Here are the window settings it affects:
 Xmin is set to 0 and Xmax is set to 9.4 making each pixel .1 units.
 Ymin is set to 0 and Ymax is set to 9.4 (each pixel is 47/310 units)
 Xscl and Yscl are set to 1
 ΔX is set to .1
 ΔY is set to 47/310
 Xres is set to 1
This command does not seem to work in programs.
Related Commands
Review
 Where can you find most drawing commands?
 What does a GDB store?
 What does a Pic store?
 Which command allows you to select a mark type?
 Are the coordinates the same for Point and Pixel Commands?
 What do you do you enable the fast circle flag?
 How do you erase a line?
 How do you get large text on the graphscreen?
Exercises
 Create a program that inverts random blocks of the graph screen.
 Create a program that uses text sprites to make a drawing, then store that to a Pic.
<< Summary  Table of Contents  Sample Program: Pong >> 
author: 'Mohammad Adib'
description: "Beta 4. A DoodleJump Clone made with Axe Parser. Latest Talk:\nhttp://www.omnimaga.org/index.php?board=158.0"
arcade: '1'
graphics: '1'
platform: '1'
puzzle: '0'
rpg: '0'
strategy: '1'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '1'
image: '/archives:doodlejump/beta%204.gif'
download: DoodleJumpBeta4.8xk
size: '20560'
unit: '1'
Member
author: BlakPilar
description: 'Have you ever wanted to get some of those pretty nifty ASCII characters, such as the arrows, or subscript numbers? Well with this program, you can! I recommend just sending this to your archive and running it with a shell (such as MirageOS) so that it does not get deleted, as the program stores its awesome characters into Str7!'
arcade: '0'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
image: /home/no_image_2.png
download: CHARS.8xp
size: '169'
unit: '1'
author: 'Mohammad Adib'
description: 'A basketball shooting game. has 1 player vs. AI, 2 player, and practice modes. fun to play, includes AI, stats at the end, and a practice mode. It is related to foul shot by N*E*V*U*M_X although, the original idea came to me at PE class in school. '
arcade: '1'
graphics: '1'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '1'
sports: '1'
casino: '0'
board: '0'
utility: '0'
misc: '1'
image: '/archives:ownagehoops/shot.gif'
download: OwnageHoops.zip
size: '9000'
unit: '1'
Nov  05 —  Added new page about recently developed routine. 
Retrieves a word from an indexed string of words with an index number.
A  The word's index number
Str0  The index of words
Str1  The word
A, Str0, Str1
TI83/84/+/SE
ADeadBody
ADeadBody
:"000Word......001another..."→Str0
:sub(Str0,3+inString(Str0,sub("0123456789",iPart(A/100)+1,1)+sub("0123456789",10fPart(iPart(A/10)/10)+1,1)+sub("0123456789",10fPart(A/10)+1,1)),10)→Str1
The routine converts the number into a string then searches for that in the string of words and stores the characters that follow it. Input in some 3 digit number ex: 001 would correspond to word 001. 102 would correspond to word 102. The routine itself can store up to 1000 10 letter words. I developed this for the purpose of storing and retrieving Pokemon names in the game I am developing but I am sure that there are other uses.
 Acceptable inputs: zero, positive integers up to 999
 Error inducing inputs: decimals, negative numbers, numbers over 1000
This example of the routine would display "helloworld",
:1→A
:"000worldhello001helloworld"→Str0
:sub(Str0,3+inString(Str0,sub("0123456789",iPart(A/100)+1,1)+sub("0123456789",10fPart(iPart(A/10)/10),1))+1,1)+sub("0123456789",10fPart(A/10)+1,1)),10)→Str1
:Disp Str1
If A were 0 instead of 1, then the output would be "worldhello".
In this modified version of the code it would output "helloworlditsme" a 15 letter code while still only displaying 10 letter words for any other input. You can see how by looking at the end of the 3rd line of programming it adds a value of 5 to the length of the outputted string under the condition of A being equal to 1
:1→A
:"000worldhello001helloworlditsme002helloworld"→Str0
:sub(Str0,3+inString(Str0,sub("0123456789",iPart(A/010)+1,1)+sub("0123456789",10fPart(iPart(A/10)/10),1))+1,1)+sub("0123456789",10fPart(A/10)+1,1)),10+5(A=1))→Str1
:Disp Str1
Error Conditions
 ERR:INVALID DIM is thrown when the input number is either over 999 or under 0
Related Routines
author: 'Mark Radocy'
description: "Pick a direction, and the player will move in that direction until it hits another block, when it will stop.\n\nIt can then be moved again the same way. Continue until the block reaches the finish.\n\nJust don't go off the screen, or it's game over!\n Contains 18 levels with autosaving\n Works with mirage OS"
arcade: '1'
graphics: '0'
platform: '0'
puzzle: '1'
rpg: '0'
strategy: '1'
sports: '0'
casino: '0'
board: '1'
utility: '0'
misc: '1'
image: 'archives:anbox/TITLE.PNG'
download: anbox.zip
size: '9873'
unit: '1'
This command will open up a template that allows you to evaluate an expression in sigma notation.
This command is accessible by pressing ALPHA then WINDOW then 2.
This command is especially useful for statistics and algebra.
It is also available in the programming mode. You can access it either through the catalog or the same way specified above.
The syntax for this command is
Σ(Expression,Variable,Starting number,Ending number)
An example would be to determine the sum of 2*X for X going from 1 to 10.
It would look like this:
Σ(2X,X,1,10
The result would be
110
n/d_Un/d is the command for switching between an improper fraction and a mixed number.
It is accessible by pressing ALPHA then Y= then 3.
n/d is the template for entering a simple fraction.
n/d is accessible by pressing ALPHA then Y= then enter.
Mode command that sets Answers to AUTO.
AUTO Answer
Press:
 MODE
 DOWN until you see Answers
 ENTER on AUTO
Alternatively, access the catalog.
TI84 2.53MP only
2 bytes
The AUTO Answer command is a mode command that changes the Answers mode to AUTO. The AUTO mode is in essence the same mode that lower OS models use. The calculator will evaluate a numerical expression and return a decimal or number in scientific notation, unless ►Frac is used.
In the Mathprint mode, no noticeable difference is seen unless the answer is converted to a fraction.
Related Commands
Mode command that puts the calculator into Classic mode.
CLASSIC
Press:
 MODE
 DOWN until you reach MathPrint or Classic
 ENTER on Classic
Alternatively, use the catalog.
TI84 2.53MP only
2 bytes
CLASSIC will put the calculator into Classic mode as opposed to MathPrint mode. The Classic mode will make the calculator display everything as preMathPrint OS would, including input. For instance, rather than superscripting exponents as MathPrint mode would, Classic mode uses the simple caret syntax (^).
MathPrint mode:
2^{4}
16
Classic mode:
2^4
16
Advanced Uses
When in Classic mode, text and numbers are displayed much faster on the home screen and the function menus load faster. This can be useful in games that use the home screen, or just with calculations in general.
Related Commands
Mode command that sets Answers to DEC.
DEC Answer
Press:
 MODE
 DOWN until you see Answers
 ENTER on DEC
Alternatively, access the catalog.
TI84 2.53MP only
2 bytes
The DEC Answer command is a mode command that changes the Answers mode to DEC. DEC mode is very similar to the AUTO mode in which the calculator will display all answers in decimal form unless the returned number is an integer. Fractions will only be displayed with use of the ►Frac command.
Related Commands
Converts a number between fraction form and decimal form.
number►F◄►D
Press:
 MATH
 RIGHT to NUM
 ALPHA B
Alternatively, access the catalog.
TI84 2.53MP only
2 bytes
The ►F◄►D command is used to convert a number from fraction form to decimal form, or vice versa. Regardless of what form the given number is, this command is meant to automatically determine the form so that it returns the other. It is in essence a combination of the ►Frac and ►Dec commands, applying ►Frac if the input is in decimal form and ►Dec if it is a fraction.
7.5►F◄ ►D
15/2
Ans►F◄ ►D
7.5
Related Commands
Un/d is a template that allows you to input a fraction with a whole number in front of it.
Un/d is accessible from most screens by pressing ALPHA and Y= then 2.
What this command does is that it adds the whole number to the fraction. It does not calculate a product but instead it calculates an addition.
Frac Answer changes the mode to display a fraction whenever possible. That is to say it will display 1/2 as a fraction but irrational numbers will not be displayed as fraction. Numbers such as Pi will still be displayed as decimals.
N is a variable, much like A or B or C, etc. Anything you can do with A you can do with N.
MATHPRINT is a command that simply changes the display mode on the home screen. This command is useful if you want to display a number as a fraction, otherwise it does nothing. Be aware that if you use this and then use an output( command to display a numerical variable , the output command may not display.
Finds the lowest numerical value from arguements
min(arg1,[arg2])
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
X
The min() Command can be executed in two different ways.
It can find the lowest of two numbers:
min(0,1)
//returns 0
It can find the lowest number in a list:
min({0,1,2})
//returns 0
Advanced Uses
For advanced users, the min command can also have its two arguments replaced with lists, as long as the two lists have the same dimensions and only include numbers. min(list,list) returns a list, with min having been done on each pair of items, as is the custom for lists in functions.
min({123},{321})
//returns {1,2,1}
It also works in much the same way for matrices.
min([[1,2,3][1,2,3]],[[3,2,1][3,2,1]])
//returns [[1,2,1][1,2,1]]
Optimization
If comparing two numbers, it is slightly faster to compare the two as two arguments than to have them in a list.
:min({1,2})
can be
:min(1,2)
The first example takes 13 seconds for 1000 repetitions, while the second takes only 9. When using the min command repetitively, this will add up.
Related Commands
author: Sleight
description: "A highly graphical sidescrolling, game in which you play a UFO shooting up buildings. Unique in that it redraws the WHOLE SCREEN for every frame, thanks to statplots and pics.\n—\nInstructions:\n\nControls: up/down moves, 2nd/del fires beam, alpha/stat fires super beam, graph boosts to top of screen.\n\nScoring: taller buildings= less points, shorter buildings= more points, extra life every 250 points.\n\nEnergy: super beam takes 2 energy, boost takes 3 energy, extra energy every 50 points\n—\nTi83+ not recommended for speed."
arcade: '1'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: 'archives:mission:raze/Screenshot.jpg'
download: MSSNRAZE.8xp
size: '2357'
unit: '1'
Avneesh wrote: comment Fantastic 
Allows you to find the log of a number using any base you want
logBASE(value,base)
Press:
 ALPHA, then F2 (which is located over the WINDOW button)
 5 or arrow keys to move down to logBASE(
or
 MATH
 A or arrow keys to move down to logBASE(
TI84+SE with TIOS 2.53 MP
2 byte
The logBASE( command is an upgrade from the log( command allowing you to input any base you want rather than being restricted to base 10. The command searches for the exponent that base b must be raised to get the given value.
This command can be used on both the home screen and while programming. If you are using CLASSIC mode, the command looks like below:
logBASE(8,2)
3
But in MATHPRINT mode, looks like the below:
log_{2}(8)
3
Formulas
The log in base b can also be found using the ln( or log( commands. This is shown below:
(1)Where in the case of the calculator, base c is 10. In other words, the two entries below are equivalent:
ln(x)/ln(b
can be
logBASE(x,b
The logBASE( command in this case saves one byte, so it is a minor optimization. However, for compatibility across calculators it would be better to use the traditional method in programs as it is only a byte more yet can be used by calculators that do not have the 2.53 MP OS.
Error Conditions
 ERR:DOMAIN occurs if you try to input 0 as value.
Related Commands
Same as modulus  divides a number, but returns the remainder.
remainder(dividend,divisor)
Press:
 MATH to enter the Math menu
 Use arrows to go to the NUM menu
 0 to choose remainder(, or use arrows
TI84+SE with TIOS 2.53 MP
2 byte
The remainder( function divides the first number given by the second number, and returns the remainder similar to the modulus. This command is only available if you have the TI84+ Silver Edition and the new 2.53 MP operating system on your calculator. This command can be used both on the Home screen and when programming.
See the code segment below for an example:
remainder(30,7)
This returns a value of 2 because 30 divided by 7 has a remainder of 2.
Compatability
As said earlier this command only works on a TI84+ Silver Edition with the 2.53 MP OS, so this will not work on earlier OSes. To avoid nonportability, use the following code.
BfPart(A/B
instead of
remainder(A,B
fPart is a command that works in more OSes and more models.
They also are the same size (5 bytes), as long as B is one byte
Error Conditions
 ERR:DIVIDE BY 0 occurs if you try to input 0 as the divisor.
 ERR:DOMAIN occurs if the divisor or dividend is either negative or less than 0
 ERR:SYNTAX occurs if the divisor or dividend is a symbol, or character or nonreal number
 ERR:DATA TYPE occurs if the divisor or dividend is not a number, (i.e. text)
Related Commands
author: Zaetsi
description: 'After turning off Ned''s hose each night, escape his yard without stepping on any Lawn Gnomes. Each night you disrupt Ned''s activities, he''ll add more Lawn Gnomes for you to dodge. If you stay in on place for too long you''ll trip his alarm system, so you can''t stop moving.'
arcade: '1'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: '/archives:thevalleyofthegnomes/VALLEY%20OF%20THE%20GNOMES.JPG'
download: VALGNOME.8xp
size: '2133'
unit: '1'
author: Zaetsi
description: 'Take on your next door neighbor Ned in the water balloon war of the century. Change the angle and power of your throws to hit Ned and collect points. More Power = More Points. The one with more points after 11 volleys shall be hailed Master of the Universe.'
arcade: '1'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '1'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: '/archives:yardwars/yard_wars.jpg'
download: YARDWARS.8xp
size: '4161'
unit: '1'
May  27 —  Due to the release of a new OS by TI (2.53MP), new commands have been added to the Command Index. 
author: patriotsfan
description: 'Use this program to strike it rich and become the next millionaire! Although, I can''t guarantee it will happen!'
arcade: '0'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '1'
image: '/archives:lottery/results.gif'
download: Lottery.zip
size: '342'
unit: '1'
Returns true for prime arguments and false for composite arguments.
isPrime(expression)
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
The isPrime() command returns a Boolean value based on whether or not the passed argument is prime or not. True is returned for prime numbers and false is returned for composite numbers. A number is prime if its divisors are only 1 and itself. For instance, the number 23 is considered prime because no two positive integers but 1 and 23 can multiply to get 23. For the calculator, 1 isn't considered prime.
isPrime(23)
true
isPrime(24)
false
Algorithm
According to TI, the algorithm run by the calculators is as follows:
"The algorithms used by the TI89 family, TI92 family, and Voyage 200 calculators divides by successive primes through the largest one less than 216. It does not actually keep a table or use a sieve to create these divisors, but cyclically adds the sequence of increments 2, 2, 4, 2, 4, 2, 4, 6, 2, 6 to generate these primes plus a few extra harmless composites.
TI92 Plus and TI89 family start the same way, except that they stop this trial division after trial divisor 1021, then switch to a relatively fast MonteCarlo test that determines whether the number is certainly composite or is almost certainly prime. The isPrime() function stops at this point returning either false or (almost certainly) true."
author: BlakPilar
description: 'This is a textbased version of Assassin''s creed. If you have any questions, comments, or find any bugs, let me know at blakpilar AT gmail DOT com'
arcade: '0'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '1'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: /home/no_image_2.png
download: AC2WM.zip
size: '27'
unit: '2'
How Ti Basic Programs Are Executed
Ti Basic Programs are executed by calling builtin functions already written for you on the calculator. Ti Basic Programs are really not executed, they are interpreted by the calculator's operating system. That means that the calculator 'reads' the programs, and then executes the appropriate function. For each command that is read in the calculator, several native commands may be executed. This means that the calculator's Central Processing Unit will have to do more processing to execute the program. This is usually not a problem for small, simple programs; but if you are considering making a game, or other complex application, it is probably a good idea to use Assembly as your programing language.
How Assembly Programs are Executed
Assembly programs are executed natively. That means that the Central Processing Unit is able to directly interpret your code, instead of having to rely on commands from the operating system. This also gives you more control over the calculator.
Too much control?
Before sending ANY assembly program to your calculator, make sure it is from a verified source. This is because when you execute an Assembly Program, you give the program complete control of the calculator. An assembly program can directly edit both RAM, and ROM, enabling it to erase the Operating System, install a virus, log your keystrokes. This is an Assembly Program is a Native Application, meaning it is directly executed by the Central Processing Unit.
Should I use Assembly?
If you are creating a rather simple program, or function , then you should probably stick with TiBasic. But, if you are creating a more complex program, like a game, then you might want to consider Assembly. Because Assembly runs faster, your game will have better performance.
Where can I start?
The two main types of assembly programs are either written directly in Assembly, or in a Compiled language, like C. A compiled language is translated into Assembly, making it easier to learn. However, programming directly in assembly gives you more control.
I am a beginner at assembly
If you are a complete beginner, and have never written in C, or C++, then you should start out with C. C is easier to write, and runs just about as fast.
Start with the list of tutorials below:
I have Programmed in C, or C++ before
I am completely familiar with the concepts of programming, and have had experience in a least one mediumlow level language. This does NOT include C#, VB.NET, or JAVA, as these are considered high level languages.
Start with the list of tutorials below:
<< Saving Data  Overview  Dialogs >> 
This will host all of the google analytics data.
Date uploaded  Link 

Jan 21, 2011 — Apr 19, 2011  Google Analytics PDF 
Oct 25, 2010 — Jan 21, 2011  Google Analytics PDF 
Jul 29, 2010 — Oct 25, 2010  Google Analytics PDF 
May 2, 2010 — Jul 29, 2010  Google Analytics PDF 
Mar 31, 2010 — Apr 30, 2010  Google Analytics PDF 
Jan — March 30, 2009  Google Analytics PDF 
Nov — March 30, 2009  Google Analytics PDF 
Nov — Jan 30, 2009  Google Analytics PDF 
Nov — Dec 21, 2008  Google Analytics PDF 
Oct — Nov 9, 2008  Google Analytics PDF 
This command turns off all or a group of functions.
FnOff [optional function numbers]
Menu Location
 Press F4 from the Homescreen to enter the OTHER menu.
 Press 8 to select the FnOff command.
This command works on all calculators.
The FnOff Command turns Graph functions off. The FnOff Command command can be used to clear the graph of any functions that the user has created before running any programs that might require the graph screen. The FnOff command can also be used to turn just one or a few functions off by stating the function number after the command FnOff:
:FnOn
:FnOff 2,3,4
The above code will turn on all functions, and then it will turn off only functions 2, 3, and 4. You can use this if you only want one or two functions to display, but you want all the functions entered so that they can be quickly graphed.
Error Conditions
260  Domain error happens when the optional function argument is not in the range 199.
Related Commands
Apr  23 —  James Kanjo redesigned the Become a Member page so that it is easier for people to become members of the TIBasic Developer community 
Okay, so the program works on mac. Well, almost. I still have to finish a few things, but since I can send byes on the mac side, I should be able to start with the main java wrapper. I still don't know about windows, though.
The Ans token
What is Ans?
Ans is a special variable that holds the value returned by the last expression or command. To understand the concept of the Ans we'll go to the main calculator screen and type a number:
:8
8
:Ans
8
Whenever an object (a variable or a list or a string …) appears in the right side of the Main screen it is assigned to Ans. Take a look at the next example:
:8
8
:Ans
8
:10
10
:Ans
10
:"HELLO"
HELLO
:Ans
HELLO
:{1,2,3}
{1,2,3}
:Ans
{1,2,3}
And so on...
As you can see the Ans can be everything. Now look at the next example:
:4→A
4
:Ans
4
So when you set a variable its value becomes the Ans, and in a program it works the same way.
Why should I use Ans?
Basically the Ans command works like some kind of calculator cache. It is the last value assigned and because of how it is built it is faster to use the Ans (just like a computer gets data from the cache faster than from the main memory). So if I use an Ans command (when possible) instead, the program will process that information faster and the user will be happier.
Some uses of the Ans:
Lets see the next example:
:Repeat Ans=21
:getkey
:If Ans
:Disp "A KEY WAS PRESSED
:If not(Ans
:Disp "NO KEY PRESSED
:End
In this example, the calculator tells the user whether a key is pressed or not. Let's have a closer look: The Repeat D=21 will execute the instructions underneath it until the Ans is equal to 21. The getKey command (we'll expand on that later) will check the key you are pressing and return the number equivalent to the key (if you are not pressing any it returns 0). Because the getKey value is stored in Ans, we do not need to use any other variables. So if Ans is different from 0, we display "A KEY WAS PRESSED." If it isn't different, we display "NO KEY PRESSED." Easy, huh?
Please note that Disp, along with some other functions, won't affect the value of the Ans command.
More on the Subject
An in depth look at the Ans variable can be found here.
<< Loops  Table of Contents  Chapter Summary >> 
Conditionals
Conditionals in TIBasic are slightly different than other programming language's conditionals. The first thing you need to understand is that an If condition tests a number. So:
:If 0
This won't show up
:If 1
This will show up
:If 2
This will show up
When the If condition tests the 0 number it returns false, so the code underneath it won't be displayed. Now if the If comes across a 1, it returns true and executes the code that follows. Now you might be asking yourself "And what about the If 2?" well in every single programming language the 0 number is equivalent to false and all numbers but 0 are equivalent to true. So when you use an If condition you are testing if a number is 0 or not 0, if it is false or not false (true) and execute (or not) the instructions that follow.
But what about this:
:1>A
:If A=0
This won't show up
:If A=1
This will show up
:If A=2
This won't show up
Well, in this case, you may think the If statement isn't testing a number but a condition. Well, you are wrong. Look at the following piece of code:
:1=1
1
:1=4
0
If you type the 1=1 in the main calculator screen you get a 1, meaning that it is true. If you type 1=4 you get a 0, it is false. So, what we can conclude is very simple: conditions return a number whether they are true or false. When comparing two numbers (or variables) the calculator will see if it is true or false and send a number: 0 if it is false; 1 if it is true; So as you can see, the calculator works an If condition by calculating the Something = Something condition, returns a number and if it is 1, executes the following code, if it is 0, it doesn't.
Now it makes sense, doesn't it? That's why we talked about If 0 and If 1 in the beginning.
So this:
:1>A
:If A=1
Do something
Is the same as this:
:If 1
Do something
Of course the first one can be false if you change the variable's value, but in this case, it is all the same thing.
Cool examples that use conditions
1. The best example of the use of conditions is the collision code located here: Collision. It uses conditions to know if the place the character is supposed to go is "walkable" or not.
2. Another rather cool example is the area calculator. You know that an area can't be negative so the program can't return a negative area. Take a look at the next example:
:Prompt A,B
:A*B>C
:If A>0 and B>0
:Then
:Disp C
:Else
:Disp 0
Looks good doesn't it? Well but it isn't. It is true that it correctly displays only positive areas but there's a simpler way of doing it:
:Prompt A,B
:AB(A>0 and B>0)>C
:Disp C
In this case, with only 3 lines of code, we do the same thing as above and we save memory. Of course, this may seem stupid because it only saves a few bits, but in a bigger game production the bits turn into bytes and then KiloBytes and the game becomes very big and unusable.
Let's just go through the code: The Prompt asks the user to give some input. Then it calculates A*B and multiplies it by the result of the condition (A>0 and B>0). So if both are greater then 0, then the condition returns 1 and C becomes A*B. If they aren't the condition returns 0 and C becomes 0. So there are no negative values!!
3. What if you want to know if a certain pixel of the screen is on? Let's see:
:45>X
:55>Y
:If pxlTest(Y,X)
Do something
Using the pxlTest( command and an If statement we get the job done!! The pxlTest( returns a number (1 or 0) whether the pixel indicated between brackets is on or off.
Some tips:
Conditions are very handy to test variables and stuff, but have to be used wisely. A very common mistake when using If conditions is forgetting the Then after the If and writing more than one line. See the next example:
:0>A
:1>B
:If A≠B
:Disp A
:Disp B
:End
WRONG… Here the Then command is missing so the calculator would return an error like: ERR: SYNTAX, because there was an extra End. Here's the correct way:
:0>A
:1>B
:If A≠B:Then
:Disp A
:Disp B
:End
And there you have it…
<< Logic Operations  Table of Contents  Loops Optimization >> 
Loops have various uses (we'll see them later), but basically loops are blocks of code that execute themselves a defined number of times. As you know there are 3 types of loops: the For( loop, the While( loop, and the Repeat( loop. These are very handy since your program ends when it reaches the end of the code, so if you are developing a game or so you need the code to flow correctly and execute over and over (for example for checking if you pressed a key and making your character walk).
101 Uses for Loops
While loops may not have exactly 101 uses, they are some of the most spectacular pieces of code that enable iterations to be made so that a game can constantly update itself or so a math program can perform a specific algorithm. The uses below represent only a few of the ways loops can be utilized.
Time Delay
A loop can be seen by many perspectives but if you think that each instruction takes time to be processed you can think (correctly) that each loop takes time to execute its code even if it is an empty loop. Watch the following example:
:For(A,1,10)
:End
As you can see, there's nothing inside that For( loop but it still takes time to be executed. So you can use a For( loop as a method of making your program sleep. Think of this as a timed Pause that delays certain parts of the program. Later you'll see an application of this use.
Note: The use of rand can also achieve a time delay, and is considerably smaller. The only difference is that rand will update Ans, while this loop method will not.
Game Iterations
Take a look at this example:
:Repeat K=21
...
Game instructions...
...
:End
In this case, the program will wait until the user presses the 2nd key, represented by K, otherwise it will keep the game running. You can include key press checkers, character movement, etc. See the next example:
:Repeat Ans=45
:A+sum(ΔList(Ans={25,34→A
:B+sum(ΔList(K={24,26→B
:getKey→K
:End
This loop is used to iterate a particular game function, in this case updating the coordinates of an object (A,B). Under certain conditions, it is actually beneficial to use the getKey as the last line of the code so that in the loop condition, Ans can be used, which may help speed the loop up.
Drawing
Because loops execute instructions over and over with different numbers, they can be used to draw. Just watch:
:For(A,5,50
:Pxlon(25,A
:End
This will draw a horizontal line between pixel 5 and pixel 50 and because of the way loops work, it will look like it is actually being drawn by somebody. This is different from using the Line( command, which makes the line appear instantaneously. Rather, this block writes each pixel one at a time, starting with (25,5), then (25,6), and so on. The next code block uses two loops together:
:For(A,5,50
:For(B,5,50
:Pxlon(A,B
:End
:End
This code will draw a square. This time, when one line is drawn, the next line begins to be drawn, until each row is complete.
Write Text
Writing text is relatively simple on the calculator. However, the calculator does it without any animation. Try the following code:
:ClrDraw
:"HELLO WORLD
:For(A,1,length(Ans
:Text(5,4A+5,sub(Ans,A,1
:End
This will write out each letter one at a time, as if it were being typed. The For( loop runs though each character in the string (which is Ans), and for each one, it types the letter in the next slot. However, this code is too fast. What other tool do we have…
:ClrDraw
:"HELLO WORLD
:For(A,1,length(Ans
:For(B,1,30
:End
:Text(5,4A+5,sub(Ans,A,1
:End
We can use the time delay from before! Using a For( loop, we can delay the program every iteration and thus overall slow down the process. Since we require Ans not to be updated, the For( loop delay works perfectly.
Challenge: Can you make a code that does the same as the above, but smaller?
Tips
Try to not nest loops in a game. "What is a nested loop?" you may be asking: a nested loop is a loop inside a loop, for example:
:WHILE A=2
:REAPEAT B=2
:FOR (C,1,10)
:END
:END
:END
Sometimes they are the only way of doing things, like checking all the screen for on pixels or whatever, but if you want to execute the same instruction 5 times in a game, do it like this:
:1>A
:WHILE A=2
Game instructions...
:IF A>6:THEN
Your instructions
:A+1>A
:END
:END
And not:
:WHILE A=2
Game instructions...
:FOR (A,1,5)
Your instructions
:END
:END
Why? Because if you did so, you wouldn't be executing any instructions (like character walking or so) besides what's in the For( loop and your game flow would be ruined…
Have fun with loops!!
<< Conditionals  Table of Contents  Optimization: The Graph Screen >> 
Name: No name given Author: No author given Download: Download Unavailable Compatibility: Parent page not set File Size: No size given 
No description given 
Name: {$name} Author: {$author} Download: [{$downloadUrl} {$downloadName}] Compatibility: {$compatibility} File Size: {$size} 
{$description} 
Name: No name given Author: No author given Download: Download Unavailable Compatibility: Parent page not set File Size: No size given 
No description given 
Name: {$name} Author: {$author} Download: [{$downloadUrl} {$downloadName}] Compatibility: {$compatibility} File Size: {$size} 
{$description} 
Included page "inc:tablet2backend" does not exist (create it now)
Name: {$name} Author: {$author} Download: [{$downloadUrl} {$downloadName}] Compatibility: {$compatibility} File Size: {$size} 
{$description} 
Determines whether an input is a number or list.
Ans  the number or list to examine
Ans  1 if the input is a number, 0 if it is a list
A [,∟A if input is a string]
TI83/84/+/SE
Deep Thought
:For(A,465230.61649186,465230.61649186
:Ans>A
:A=Ans(1
You can replace 465230.61649186 with any obscure and nearly impossible number.
If Ans is a list, it is stored to ∟A. A remains whatever that number is, and A=Ans(1 (assuming that Ans as a list has at least one value) returns false. If Ans is a number, it is stored into A, thus A=Ans(1 (Ans times 1) returns true.
The For( command is used to avoid updating Ans. End should be added to the end if this routine is used inside a larger program.
Here are a few tips on what to do next:
1 Get an idea for a game or an application. Try this website if you do not feel inspired: http://www.ticalc.org/programming/ideas/;
2 Try making it by following some of the articles writen in this website;
3 Optimize the code and add some cool menus and stuff;
4 Send it into your computer (you will require a usb link cable [usually comes with the calculator…] and this software: TI Connect);
5 Try protecting the code of your game/app, use this software: TI Graph link 83  plus, open your file, check the protected box and save it;
6 Now create a zip file with your game/app files, a read me (with some instructions) and a screenshot (use the TI connect to accomplish it, it has a app included [the icon of a camera  when you open the program  in the main menu]);
7 Send it to the web to get some feedback, this website is good: http://www.ticalc.org/cgibin/file_upload.pl?a=1, or try including a link to a page in this website, where you include your game/app download;
Well, now off you go to the TIBASIC Programming world, happy programming!
P.S. If you get really addicted to calculator programming, try learning "Assembly" to the calculator (the programming language of your application), just google it…
<< Review  Table of Contents  Project Ideas >> 
Simple homescreen menu without using the menu( command.
ClrHome
Disp ">OPTION 1"," OPTION 2"," OPTION 3 // note the spaces before OPTION 2 and OPTION 3
1>A
Repeat Ans=105
If Ans
Output(A,1," // one space
min(3,max(1,A+sum(List(Ans={25,34>A // the List has an implied delta sign (triangle) before it.
Output(A,1,">
getKey
End
If A=1
Disp "OPTION 1 ACTION
If A=2
Disp "OPTION 2 ACTION
If A=3
"OPTION 3 ACTION
Simple graphscreen menu.
ClrDraw
Horizontal Ymin
Horizontal Ymax
Vertical Xmax
Vertical Xmin
Text(1,3,35,"MENU
Text(20,25,">OPTION 1
Text(26,29,"OPTION 2
Text(32,29,"OPTION 3
20>A
Repeat Ans=105
If Ans
Text(A,25," // Four spaces
min(32,max(20,Ans+6sum(List(Ans={25,34>A // The "List" has an implied delta (little triangle) before it.
Text(A,25,">
getKey
End
If A=20
Disp "OPTION 1 ACTION
If A=26
Disp "OPTION 2 ACTION
If A=32
"OPTION 3 ACTION
You can adjust the Text( values to determine what spacing you would like.
Mar  11 —  The archives have been upgraded to make uploading process much easier. 
facingtomorrow
6x9 connect four game skeleton
just like the real thing
includes graphics, animation, save/load game, resets settings on exit and 2 player gameplay
does not include AI or win checking
PLEASE REMOVE the following words that do NOT describe your program:
Arcade Graphics Puzzle Strategy Board Misc
http://tibasicdev.wikidot.com/localfiles/challenges:25/scn.png
CONECTFR.zip
952 bytes
author: 'skwerlman (David Birnhak)'
description: 'This program looks at two waves of the form ASin(BX+C) and graphs their interference pattern.'
arcade: '0'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
image: '/archives:waveinterferencegrapher/waveinterferencedemo(1).gif'
download: WAVES.zip
size: '235'
unit: '1'
Name: {$name} Author: {$author} Download: {$download} Compatibility: {$compatibility} File Size: {$size} 
{$description} 
Finds the Greatest Common Denominator
gcd(int1,int2)
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
The gcd( command is used, as its name implies, to find the greatest common divisor of two numbers.
:gcd(351,65)
returns 13
Error Conditions
260  Domain error happens when an argument is not real.
Related Commands
Well, animation in any Ti basic program can be a problem, though 68k calculators have better capability for animations. There are a virtually unlimited number of picture names, and folders allow for even more possibilities. Due to the limitations of a calculator's basic graphics, the best way to animate is to use a series of predrawn pictures, displayed one after another. Even this has limitations, as the relatively slow refresh rate can make animations seem choppy. Also, each frame must be created individually, so animation design is very timeconsuming. If anyone could please elaborate on this, it would be greatly appreciated.
<< Sprites  Overview  Compression >> 
author: EragonFreakMaster
description: 'Tools to help in your Geometry or Trigonometry class, solving anything to do with triangles.'
arcade: '0'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
image: /home/no_image_2.png
download: TrigTools.zip
size: '6223'
unit: '1'
The ▶Bin command converts numbers into binary.
int▶Bin
Menu Location
 [2nd]
 [Math]
 [up or E]
 [right]
 [4]
This command works on all calculators.
4 bytes
▶Bin converts an integer from decimal (base 10) or hexadecimal (base 16) into binary (base 2).
:15▶Bin
0b1111
:0h15▶Bin
0b10101
Related Commands
Determines whether an input is a number or string.
Ans  the number or string to examine
Ans  1 if the input is a number, 0 if it is a string
A, B [,∟A, ∟B if input is a string]
TI83/84/+/SE
bfr
URL: [http://www.unitedti.org/forum/index.php?showtopic=9191]
:DelVar AFor(B,1,1
:Ans>A
:Ans>B
:A=B
If Ans is a string, it is stored to ∟A and ∟B. A remains 0, B remains 1, and A=B returns false. If Ans is a number, it is stored into both A and B, thus A=B returns true.
The For( command is used to avoid updating Ans. If this routine is used in a larger program and the input can be stored into a more permanent variable, For(B,1,1 can become 1>B. If this is not possible, the For( statement should have an End added.
Dec  17 —  Congrats to AJLitzau13 for winning Challenge 9! 
author: 'Kieran Berard'
description: 'This program guesses any whole number from 163. It will guess it on the first try…'
arcade: '0'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '1'
image: '/archives:magicmindz/Magic%20Mindz.gif'
download: Magic_Minds.zip
size: '4292'
unit: '1'
Draws a line between a set of two coordinates.
Line xStart, yStart, xEnd, yEnd, drawmode
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
X byte(s)
The line command draws a line between two points. By default, the drawing mode is set to 1, which draws the line normally, so it doesn't have to be included if drawing a regular line.
Line 0, 3, 0, 9
Advanced Uses
The drawmode can be set to 0 to draw a "white" line, which will remove the pixels on the path of the line.
Line 0, 3, 0, 9, 0 //removes the line
You can also invert pixels on the line using 1 as the number argument.
Line 0, 3, 0, 9, 1
Related Commands
 Creating graphics is done on the graph screen, not the home screen.
 On the graph screen, locations are given either as point or pixel coordinates.
 Pixel coordinates start with (0,0) at the top left corner, like on the homescreen, but increment in individual pixels.
 Point coordinates depend on the window dimensions.
 You can adjust the window dimensions by manipulating the window variables and/or by using the zoom commands.
 You can also use the format commands to turn the axes off and other related things.
 You can save the window dimensions, format options, and other related things in a GBD. (Graph Database)
 Once you have the graph screen set up, you can draw on it using the draw commands.
 You can erase the graph screen with the ClrDraw command, and you can save what is on the graph screen in a Pic.(Picture)
 Unfortunately Pics can only store the entire screen. They also don't force pixels that are already black to become white; sometimes this can be a good thing.
 One particularly creative and effective way to create sprites is known as the text sprite method.This involves overlapping text to create sprites quickly.
Commands Introduced
 StorePic, RecallPic, StoreGDB, RecallGDB
 PxlOn(, PxlOff(, PxlChange(, PxlTest(, PtOn(, PtOff(, PtChange(
 ZStandard, ZInteger, FnOff, FnOn, AxesOn, AxesOff
 Horizontal, Vertical, Line(, Circle, DrawF, DrawInv, Tangent(, Shade(, Text(
<< Using Pictures  Table of Contents  Chapter Exercises >> 
…that if you have a rather bulky matrix or list, you can store it as a string to one of the sequence variables, u,v,w and halve the size? Then, you can evaluate the expression using said variable and Ans(X) where X equals the list or matrix element you want?
IsLocked checks if a variable is locked.
o>var1
lock var1
islocked var1
true
unlock var1
islocked var1
false
Checks to see if a variable is archived
isArchiv(variable)
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
X byte(s)
The isArchiv() command checks if a variable is archived.
0>var1
Archive var1
IsArchiv var1
true
UnArchiv var1
IsArchiv var1
false
Related Commands
Converts a number to a base16 number.
integer▶Hex
Menu Location
MATH/base
This command works on all calculators.
2 bytex
The ▶Hex command takes an integer and converts it to hexadecimal, including the prefix "0h". Here is an example program.
15›Hex
//returns F
16›Hex
//returns 10
0b10000›Hex
//returns 20
Related Commands
The Disp command displays output in the Home App I/O screen.
prgmexmp()
Prgm
Request "Enter something",var1 © Get a value for var1
Disp "var1="&string(var1)
Pause
DelVar var1
ClrIO
DispHome
EndPrgm
Unarchives a given variable
Unarchiv variable
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
The Unarchiv command removes a variable from the flash ROM.
Prgm
© //assuming var1 and var2 are actual variables
Archive var1,var2
isArchiv(var1)→check
Disp check
Pause
Unarchive var1,var2
Disphome
EndPrgm
Related Commands
Locks a given variable
Unlock variable1
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
2 byte(s)
The Unlock command unlocks locked variables. It is paired with the Lock command.
lock var1,var2
unlock var1,var2
Related Commands
Locks the specified variables
Lock var1, var2, etc
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
X byte(s)
The lock command prevents a variable's value from changing. In programs and functions, lock is usually used to stop a variable from undesirably changing. If a variable is universally defined (like files in folders), the lock command has a popular purpose of making the variable constant (unchanging) throughout use in sets of programs.
input "Input var1 here: ",var1
lock var1
text "You can no longer change var1."
© var1 can now be used as a constant variable.
©... <program statements that require the value of var1>
prgm2() ©var1 may not change in any other programs.
unlock var1
Note: the © command will turn any code written until the next ':' into comments. (neatfreaks love this.)
Comments are very helpful for people who forget, especially when dealing with tricky commands and code. Using comments for the lock command will help you remember to unlock the variable when the time comes to delete it.
Related Commands
ztrumpet
Oasis is a basic shell that runs basic programs.
Oasis uses Celtic III (included).
PLEASE REMOVE the following words that do NOT describe your program:
Utility Misc
http://tibasicdev.wikidot.com/localfiles/archives:oasis/Oasis.gif
Oasis.zip
2751
This program identifies whether a number is prime.
NOTE: This program does not display a correct result for 0, 1, or 2, which are special cases.
PROGRAM: PRIME
:ClrHome
:Prompt X
:1→Y
:For(P,2,√(X)+1)
:If fPart(X/P)*P=0
:Then
:P→Y
:Goto E
:End
:End
:Lbl E
:If Y≠1
:Then
:Disp X
:Disp "Composite"
:Disp "Divisible by"
:Disp Y
:End
:If Y=1
:Then
:Disp X
:Disp "Is prime"
:End
(If you plan to copy and paste this string of code into a program editor remember to remove the colons.)
author: ztrumpet
description: "Oasis is a basic shell for your calculator that will run basic programs.\nYou must have Celtic III (included) to run Oasis."
arcade: '0'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '1'
image: '/archives:oasis/Oasis.gif'
download: Oasis.zip
size: '2751'
unit: '1'
As proven there is very much intrested in this project. One on the main things to get clear is: Who joins? so far:
Matthias1992 (Me)
Sleight
author: Sleight
description: 'A 3D engine that draws rectangular prisms (any size, solid or transparent) on the graph screen using pseudoonepoint perspective. Also includes Cubes, a simple program that shows what it is capable of.'
arcade: '0'
graphics: '1'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
image: '/archives:prisms/Prism.png'
download: PRISMS.8xp
size: '473'
unit: '1'
author: 'Roy S.'
description: 'A calculator version of the famous card game: BlackJack. Graphical, fully operational.'
arcade: '0'
graphics: '1'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '1'
sports: '0'
casino: '1'
board: '0'
utility: '0'
misc: '0'
image: '/archives:blackjack/SCREEN01.gif'
download: BJACK.8xp
size: '5488'
unit: '1'
Member
Member
Member
Joined Oct 26 —  Is Stranger does not match any existing user name 
Time Zone: Not given
Outputs the number corresponding to a keypress.
None
Ans  The number pressed.
TI83/84/+/SE
Unknown, Toothless the Night Fury
:Repeat Ans≤9
:Repeat Ans
:getKey
:End
:Ans(102≠Ans)13int(Ans/13(2>abs(5abs(5abs(Ans83
:End
The routine waits for a key that corresponds to a number 09. All magic is on the lengthy line.
An alternate method to this is an adaptation of the Key Code to Letter routine, written below. Both methods share very extremely fast speeds, but the alternate method uses slightly more bytes. However, it does have the advantage of converting keycodes to strings instead of numbers, has the added period, and can be easily converted to numbers (through expr) if needed (unlike the other way around).
:Repeat Ans>71 and min(Ans≠{75,81,85,91,95
:getKey
:End
:sub("789 456 123 0.",Ans365int(.1Ans),1
Modifications
 You can delete the :Repeat Ans<=9 :End loop to not wait
 Delete the (102≠Ans) if you don't need the 0 number
 Fixed from "Outputs the letter corresponding to a keypress." to "Outputs the number."
 Added alternate method and general cleanup.
Error Conditions
None known.
Related Routines
Outputs a letter corresponding to a keypress.
None
Ans  the letter as a string
TI83/84/+/SE
Weregoose
URL: Weregoosepage
:Repeat Ans>34 and min(Ans≠{44,45,105
:getKey
:End
:sub("ABC**DEFGHIJKLMNOPQRSTUVWXYZθ'* :?",Ans5int(.1Ans+4),1
The Repeat loop makes sure good input is passed.
The last line takes from the string the letter according to the keycode.
Error Conditions
None.
Related Routines
author: ztrumpet
description: "Drifter is a game in which you slide until you hit an object.\nThere are many pieces that you will come in contact with that change the direction you're going.\nCollect all the +s and/or numbers 19 then reach the flag to win.\nDrifter includes 16 levels and a custom level editor for endless hours of fun."
arcade: '1'
graphics: '0'
platform: '0'
puzzle: '1'
rpg: '0'
strategy: '1'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: '/archives:drifter/driftervideo.gif'
download: drifter.zip
size: '11056'
unit: '1'
An efficient OS that lets you run and manage TIBasic programs and get calculator information. It also has the option to use a USB mouse to control the cursor onscreen.
PLEASE REMOVE the following words that do NOT describe your program:
Utility
http://tibasicdev.wikidot.com/localfiles/challenges:23/IlliniOS.gif
IlliniOS.zip
2,642 or 2,836 bytes
Recalls a picture variable and the graph screen at [row][, column]
RclPic picVar,[row][, column]
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
This command is used to recall (open) a picture you have saved on your calculator. This is normally used in programs, because you can open pictures from the graph when you are not running a program. It is very useful for sprites as well, as it can recall a picture variable on top of a background, without deleting any of the background. In a program, however, you can recall a different picture for a different input, as shown below:
:If a=16
:RclPic 2
:Else
:RclPic 3
Error Conditions
260  Domain error happens when the [row][,column] argument is outside the screen range..
960  Undefined variable happens when the picture variable specified does not exist..
Related Commands
See Also
Creates a custom menu
Menu Location
Describe how to get the command from a menu.
This command works on all calculators.
2 bytes
Similar to the Menu( command, the DropDown is used in a dialog box to make body text that includes a dropdown menu, with multiple options. This is good for use in text RPGs or game menus where a dialog box already exists and there isn't a need for another box. Look at this code for example:
:Dialog
:DropDown "Do you like food?", {"Yes", "No"}, t
:EndDlog
This will create a window with the title as "Do you like food" and the options as "Yes" and "No". "T" corresponds to the choice you selected For example, if you chose "Yes", the "T" would be equal to 1. However, if you pressed "No", then "T" would be equal to 2. Basically, the value of your chosen variable will correspond to the choice you made in the window.
Error Conditions
730  Missing start or end of block syntax happens when the command isn't put between a Dialogue/EndDlog block.
Related Commands
Credits
Credits to an unknown user (who's account got deleted). He/she created the code and the first paragraph of the explanation.
Sep  28 —  Archives have been redesigned. 
Changed the name of the game to [Technica: Clash of the Forces]. It's a completely different game from what I originally had. Get ready for this one; work starts after documentation is finished.
Returns the absolute value of an argument.
abs(expression)
Menu Location
 Press 2nd MATH to enter the MATH popup menu.
 Press 1 to enter the Number submenu.
 Press 2 to select abs(.
This command works on all calculators.
The abs() command returns the absolute value of an expression. The absolute value of a real number is the number of units from 0 the number is. The absolute value of 7 for example is 7 becasue it is that many units away from zero. The absolute value of 7 however is 7. So it in a way gets rid of the negative.
The absolute value of a complex or imaginary number can also be taken, but it is done a little differently. If a complex number is written a+bi, then the absolute value of the number is √(a^{2}+b^{2}).
abs(5)
5
abs(5)
5
abs(3+4i)
5
Related Commands
 Negation ( ^{} )
Timothy
Do not process this dummy program!
This is a test for the new system. I want to see what errors out and what doesn't.
New line.
PLEASE REMOVE the following words that do NOT describe your program:
Platform Misc
http://tibasicdev.wikidot.com/localfiles/home/no_image_2.png
Unavailable
1024 bytes
Oh my goodness. No wonder TIConnect is so horrible. It's the calculators fault. Turns out, that to get one variable, you have to get a directory listing of every single one!!!! (That is to say, that I am working on it…)
Member
So I finally found a free USB logger, and could see the data sent/received. Yay!!! This project continues!!!
I have been busy with things, but this projects is not dead. I am trying to see the variable data from a transfer. If you have a program that can do that, would you just do the variable A as 267193, recieve it from your calc, then send it back, and send me what bytes were sent to/received from the calc. This is for USB btw.
Sets the current time on the calculator's clock, returning the previous time setting.
setTime(hours,minutes,seconds)
Menu Location
This command can't be found in any menu besides the command catalog.
This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI89 Titanium or Voyage 200 calculator)
3 bytes
The setTime() command changes the time of day on the calculator's clock (give it the new time in hours, minutes, and seconds, in that order). The value it returns is the previous time setting, as a list of {hours,minutes,seconds}.
setTime() respects the current time zone: if you set the time to 8 AM, it will change the time to 8 AM in the time zone you're using, not necessarily to 8 AM GMT. Make sure to change the time zone before you set the time, if you plan to do both, or you'll get the wrong result.
The calculator measures time starting from 00:00 GMT on January 1, 1997. Although setDate() will reject any date earlier than that, with a combination of setTime() and setTmZn() you might actually end up with an earlier time than that. If this happens, the calculator keep counting the time correctly, but return a time of 00:00 GMT until it reaches a normally valid time.
A final quirk of setTime() is that it affects the output of startTmr() and checkTmr(). So if you're timing a section of your program, and use setTime() in the middle of that section, the time lapse will get thrown off.
Error Conditions
40  Argument error happens when an invalid time is given.
Related Commands
Member
Member
@import url(http://static.wikidot.com/commontheme/co/css/style.css?0); .code { fontsize: 105%; } .hiddencollapsible .collapsibleblocklink { textdecoration:none; } .hover {color: #3B4;} .hover span {display: none;} .hover:hover span { position: absolute; display: inline; margin: 15px 20px; height: auto; maxwidth: 200px; background: #FFF; border: 2px solid #34B; color: #000; padding: 1em; } .menu .show { display: none; zindex: 9; } .default .show { display: block; zindex: 8; } .menu:hover .show { display: block; } .infobox{ color: #FFFFFF; } .infobox a{ color: #FFFFFF; } .blink, .blink a { textdecoration: blink; } #header { background: #202817; minwidth: 800px; width:expression(document.body.clientWidth < 800? "800px" : "auto"); } #header h1 { padding: 0; margin: 0; width: 800px; //735px; //789px; height: 69px; background: #141B0C; backgroundimage: url(http://tibasicdev.wikidot.com/localfiles/logo/Logo10C.PNG); } #header h1 a { padding: 0; margin: 0 320px 0 8px; width: 472px; //721px; //735px; //789px; height: 69px; display: block; } #header h1 span { display: none; } #topbar { top: 69px; height: 21px; minwidth: 976px; padding: 0; backgroundcolor: #5C634D; borderbottom: 2px solid #5C634D; } #topbar a, #topbar li ul li a { backgroundcolor:#5C634D; } #topbar a:hover, #topbar li ul li a:hover { backgroundcolor:#5C634D; } #sidebar { minwidth: 185px; } .specialcollapsible .collapsibleblockunfolded .collapsibleblocklink { fontweight: bold; paddingleft: 0em; } .specialcollapsible a { margin: 0; paddingtop: 2px; paddingbottom: 2px; display: block; paddingleft: 1em; borderbottom: 1px solid #BBBEAB; bordertop: 1px solid #D2D3C6; color: #1E2B31; textdecoration: none; } #header h2 { display: none; } #licenseareas { color: #E9DCE7; background: #5C634D; } #licenseareas a { color: #E9DCE7; background: #5C634D; } table.charmap { background: white; border: #999 solid 1px; borderspacing: 2px; padding: .3em; tablecollapse: collapse; } table.charmap tr td { textalign: center; } .wdeditortoolbarpanel li.hseparator { background: url('http://tibasicdev.wikidot.com/localfiles/home/toolbarseparator.png'); width: 22px; height: 22px; margin: 1px; } @media print { #printhead,#pageinfo, #licensearea,#printfooter { display: none !important; } div#pagecontent:after { textalign: center; width: auto !important; display: block !important; margin: 2em 0 0; clear: both !important; paddingtop: .5em; bordertop: 1px solid #000; content: "TIBasic Developer © 20062009 — \"A wiki for the TIBasic beginner and advanced alike!\""; } } .taby .yuinavset .yuinav a, .taby .yuinavset .yuinavsettop .yuinav a{ background:#FFF; border:1px solid #AAA; } .taby .yuinavset .yuinav .selected a, .taby .yuinavset .yuinav .selected a:focus, .taby .yuinavset .yuinav .selected a:hover { background:#F4F4F4; color:#222; border:1px solid #AAA; } .taby .yuinavset .yuinav a:hover, .taby .yuinavset .yuinav a:focus { background:#EEEEEE; } .taby .yuicontent{ background:transparent; border:none; } .taby .yuinavset .yuinav { border: 0; } #footer{ background:#5C634D; bordercolor: #141B0C; } body{ background:#E5E9D2; } #sidebar{ background:#C6C9AD; } #sidebar li a{ borderbottom: 1px solid #BBBEA7; bordertop: 1px solid #D2D3C2; }
Aug  27 —  James Kanjo made the site's CSS theme dynamic. You can manipulate the Site Theme or the Forum Theme without Administrator privileges and with instantaneous results. 
@import url(http://static.wikidot.com/commontheme/co/css/style.css?0); .code { fontsize: 105%; } .hiddencollapsible .collapsibleblocklink { textdecoration:none; } #searchtopbox, #loginstatus { marginright: 4em !important; } .chars{ position: absolute; top: 0; right: 0; zindex: 999; } .chars2{ position: fixed; top: 0; right: 0; zindex: 1000; } .chars, .chars2 { textalign: center; border: 1px solid #999; padding: 0; margin: 0 0 0 0; background: #f7f7f7; fontfamily: Trebuchet MS, Trebuchet, Verdana, Arial, Helvetica; } .infos:after { float: right; content: "→∟‾×√Σ≠≥≤πΔχ▶ֿ¹²³L₁L₂L₃L₄L₅L₆≅ℕºθ÷±∠∞♦⇧∫∏©"; } .pageslist { margin: 0.5em 0; padding: 0; display: block; } .pageslist div.pageslistitem { margin: 0; padding: 0; display: block; } .pageslistitem div.title { margin: 0; padding: 0; } .pageslist div.pageslistitem a { margin: 0; paddingtop: 2px; paddingbottom: 2px; paddingleft: 1em; color: #1E2B31; display: block; borderbottom: 1px solid #BBBEAB; bordertop: 1px solid #D2D3C6; textdecoration: none; } .pageslist div.pageslistitem a:hover { background: #D1D3C3; } .infobox{ color: #FFFFFF; } .infobox a{ color: #FFFFFF; } #header { background: #OC141B; minwidth: 800px; width:expression(document.body.clientWidth < 800? "800px" : "auto"); } #header h1 { padding: 0; margin: 0; width: 800px; //735px; //789px; height: 69px; background: #OC141B; backgroundimage: url(http://tibasicdev.wikidot.com/localfiles/logo/Logo10B.PNG); } #header h1 a { padding: 0; margin: 0 320px 0 8px; width: 472px; //721px; //735px; //789px; height: 69px; display: block; } #header h1 span { display: none; } #topbar { top: 69px; height: 21px; minwidth: 976px; padding: 0; backgroundcolor: #4D5C63; borderbottom: 2px solid #4D5C63; } #topbar a, #topbar li ul li a { backgroundcolor:#4D5C63; } #topbar a:hover, #topbar li ul li a:hover { backgroundcolor:#4D5C63; } #sidebar { minwidth: 185px; } #header h2 { display: none; } #licensearea { display: none !important; } table.charmap { background: white; border: #999 solid 1px; borderspacing: 2px; padding: .3em; tablecollapse: collapse; } table.charmap tr td { textalign: center; } .wdeditortoolbarpanel li.hseparator { background: url('http://tibasicdev.wikidot.com/localfiles/home/toolbarseparator.png'); width: 22px; height: 22px; margin: 1px; } @media print { #printhead,#pageinfo, #licensearea,#printfooter { display: none !important; } div#pagecontent:after { textalign: center; width: auto !important; display: block !important; margin: 2em 0 0; clear: both !important; paddingtop: .5em; bordertop: 1px solid #000; content: "TIBasic Developer © 20062009 — \"A wiki for the TIBasic beginner and advanced alike!\""; } } .werecode{ fontfamily: 'Andale Mono', 'Courier New', Courier, monospace; fontsize: 9pt; color: #11119C; } .ti83{ fontfamily: Ti83pc,'Andale Mono','Courier New',Courier,monospace; borderleft:3px dotted #000; background:#EEE; paddingleft:3px; color:#367A4B; margin:3px 2em 5px 1em; } .nspire{ background: #FFF; border: 1px dashed #DDD; paddingleft:1em; margin: 1em 0 1em 0; fontfamily:'Arial Unicode MS',verdana,arial,helvetica,sansserif; color: #222; letterspacing:1.2pt; }
@import url(/commontheme/co/css/style.css); @import url(/localcode/css:archive); @import url('http://css.wikidot.com/cssnippet:inlinehovertips/code_'); @import url('http://css.wikidot.com/cssnippet:externallinkindicators/code_'); .code { fontsize: 105%; } .commentsbox .code { maxheight: 300px; overflow: auto; } .hiddencollapsible .collapsibleblocklink { textdecoration:none; } .hover {color: #3B4;} .hover span {display: none;} .hover:hover span { position: absolute; display: inline; margin: 15px 20px; height: auto; maxwidth: 200px; background: #FFF; border: 2px solid #34B; color: #000; padding: 1em; } .menu .show { display: none; zindex: 9; } .default .show { display: block; zindex: 8; } .menu:hover .show { display: block; } .infobox{ color: #FFFFFF; } .infobox a{ color: #FFFFFF; } .blink, .blink a { textdecoration: blink; } #header { background: #172028; minwidth: 800px; width:expression(document.body.clientWidth < 800? "800px" : "auto"); } #header h1 { padding: 0; margin: 0; width: 800px; //735px; //789px; height: 69px; background: #OC141B; backgroundimage: url(http://tibasicdev.wikidot.com/localfiles/logo/Logo10B.PNG); } #header h1 a { padding: 0; margin: 0 320px 0 8px; width: 472px; //721px; //735px; //789px; height: 69px; display: block; } #header h1 span { display: none; } #topbar { top: 69px; height: 21px; minwidth: 976px; padding: 0; backgroundcolor: #4D5C63; borderbottom: 2px solid #4D5C63; } #topbar a, #topbar li ul li a { backgroundcolor:#4D5C63; } #topbar a:hover, #topbar li ul li a:hover { backgroundcolor:#4D5C63; } #sidebar { minwidth: 185px; } .specialcollapsible .collapsibleblockunfolded .collapsibleblocklink { fontweight: bold; paddingleft: 0em; } .specialcollapsible a { margin: 0; paddingtop: 2px; paddingbottom: 2px; display: block; paddingleft: 1em; borderbottom: 1px solid #BBBEAB; bordertop: 1px solid #D2D3C6; color: #1E2B31; textdecoration: none; } #header h2 { display: none; } #licenseareas { color: #E7E9DC; background: #4D5C63; } #licenseareas a { color: #E7E9DC; background: #4D5C63; } table.charmap { background: white; border: #999 solid 1px; borderspacing: 2px; padding: .3em; tablecollapse: collapse; } table.charmap tr td { textalign: center; } .wdeditortoolbarpanel li.hseparator { background: url('http://tibasicdev.wikidot.com/localfiles/home/toolbarseparator.png'); width: 22px; height: 22px; margin: 1px; } @media print { #printhead,#pageinfo, #licensearea,#printfooter { display: none !important; } div#pagecontent:after { textalign: center; width: auto !important; display: block !important; margin: 2em 0 0; clear: both !important; paddingtop: .5em; bordertop: 1px solid #000; content: "TIBasic Developer © 20062009 — \"A wiki for the TIBasic beginner and advanced alike!\""; } } .taby .yuinavset .yuinav a, .taby .yuinavset .yuinavsettop .yuinav a{ background:#FFF; border:1px solid #AAA; } .taby .yuinavset .yuinav .selected a, .taby .yuinavset .yuinav .selected a:focus, .taby .yuinavset .yuinav .selected a:hover { background:#F4F4F4; color:#222; border:1px solid #AAA; } .taby .yuinavset .yuinav a:hover, .taby .yuinavset .yuinav a:focus { background:#EEEEEE; } .taby .yuicontent{ background:transparent; border:none; } .taby .yuinavset .yuinav { border: 0; } .werecode{ fontfamily: 'Andale Mono', 'Courier New', Courier, monospace; fontsize: 9pt; color: #11119C; } .ti83{ fontfamily: Ti83pc,'Andale Mono','Courier New',Courier,monospace; borderleft:3px dotted #000; background:#EEE; paddingleft:3px; color:#367A4B; margin:3px 2em 5px 1em; } .nspire{ background: #FFF; border: 1px dashed #DDD; paddingleft:1em; margin: 1em 0 1em 0; fontfamily:'Arial Unicode MS',verdana,arial,helvetica,sansserif; color: #222; letterspacing:1.2pt; } .Infobox{ background: #FDFCF6; border: 1px solid #8D9CA3; fontsize: 120%; width: auto; padding: 10px; } .imageboxheading{ background: #4D5C63; color: #E7E9DC; } /* Teletype */ .tt { fontweight: 900; } /* Data Forms */ .formtable .formvalue {display: inlineblock;}
Name: Mix 'n Match Author: Maarten Janssen Download: Mix 'n Match Compatibility: Parent page not set File Size: 3020 bytes 
Mix 'n Match is a Bejeweled type of game where you need to match at least three adjacent tiles of the same type and try to make cascading matches to score points. 
Takes the hyperbolic cosecant of a number.
csch(value)
Menu Location
 Press 2nd MATH to enter the MATH menu.
 Press C to enter the Hyperbolic submenu.
 Press 4 to select csch(.
This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI89 Titanium or Voyage 200 calculator)
1 byte
The csch() command returns the hyperbolic cosecant of a number. Along with 11 other trig and hyperbolic functions, it was added in AMS version 2.07; on earlier versions, csch(x) can be replaced by 1/sinh(x).
As long as the calculator is in radian mode, csch() can be used with complex numbers according to the rule that csch(ix)=csc(x)*i and csc(ix)=csch(x)*i. This rule only works in radian mode, and csch() of a complex number will return a domain error when working in degrees or gradians.
Occasionally, csch() can compute an exact result; most of the time, the calculator will leave an expression with csch() alone unless it's in approximate mode (or you force an approximation). When csch() is used with symbolic expressions, the calculator can go back and forth between the csch() expression and its exponential equivalent.
:csch(0)
undef
:expand(csch(x))
1/(e^x+1)+1/(e^x1)
:comDenom(1/(e^x+1)+1/(e^x1))
1/sinh(x)
If csch() is applied to a list, it will take the hyperbolic cosecant of every element in the list. However, it can't be applied to matrices the way sinh() can (this is probably an oversight; all the trig and hyperbolic functions that were present in all AMS versions work with matrices, but the ones added in version 2.07 do not).
Formulas
The definition of hyperbolic cosecant is, by analogy with csc(), the reciprocal of sinh():
(1)Error Conditions
260  Domain error happens when taking csch() of a complex number in degree or gradian mode.
Related Commands
Takes the hyperbolic secant of a number.
sech(value)
Menu Location
 Press 2nd MATH to enter the MATH menu.
 Press C to enter the Hyperbolic submenu.
 Press 5 to select sech(.
This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI89 Titanium or Voyage 200 calculator)
1 byte
The sech() command returns the hyperbolic secant of a number. Along with 11 other trig and hyperbolic functions, it was added in AMS version 2.07; on earlier versions, sech(x) can be replaced by 1/cosh(x).
As long as the calculator is in radian mode, sech() can be used with complex numbers according to the rule that sech(ix)=sec(x) and sec(ix)=sech(x). This rule only works in radian mode, and sech() of a complex number will return a domain error when working in degrees or gradians.
Occasionally, sech() can compute an exact result; most of the time, the calculator will leave an expression with sech() alone unless it's in approximate mode (or you force an approximation). When sech() is used with symbolic expressions, the calculator can go back and forth between the sech() expression and its exponential equivalent.
:sech(0)
1
:expand(sech(x))
2*e^x/((e^x)^2+1)
:comDenom(2*e^x/((e^x)^2+1))
1/cosh(x)
If sech() is applied to a list, it will take the hyperbolic secant of every element in the list. However, it can't be applied to matrices the way cosh() can (this is probably an oversight; all the trig and hyperbolic functions that were present in all AMS versions work with matrices, but the ones added in version 2.07 do not).
Formulas
The definition of hyperbolic secant is, by analogy with sec(), the reciprocal of cosh():
(1)Error Conditions
260  Domain error happens when taking sech() of a complex number in degree or gradian mode.
Related Commands
Takes the hyperbolic cotangent of a number.
coth(value)
Menu Location
 Press 2nd MATH to enter the MATH menu.
 Press C to enter the Hyperbolic submenu.
 Press 6 to select coth(.
This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI89 Titanium or Voyage 200 calculator)
1 byte
The coth() command returns the hyperbolic cotangent of a number. Along with 11 other trig and hyperbolic functions, it was added in AMS version 2.07; on earlier versions, coth(x) can be replaced by 1/tanh(x).
As long as the calculator is in radian mode, coth() can be used with complex numbers according to the rule that coth(ix)=cot(x)*i and cot(ix)=coth(x)*i. This rule only works in radian mode, and coth() of a complex number will return a domain error when working in degrees or gradians.
Occasionally, coth() can compute an exact result; most of the time, the calculator will leave an expression with coth() alone unless it's in approximate mode (or you force an approximation). When coth() is used with symbolic expressions, the calculator can go back and forth between the coth() expression and its exponential equivalent.
:coth(0)
undef
:expand(coth(x))
1/(e^x+1)+1/(e^x1)+1
:comDenom(12/((e^x)^2+1))
1/tanh(x)
If coth() is applied to a list, it will take the hyperbolic cotangent of every element in the list. However, it can't be applied to matrices the way tanh() can (this is probably an oversight; all the trig and hyperbolic functions that were present in all AMS versions work with matrices, but the ones added in version 2.07 do not).
Formulas
The definition of hyperbolic cotangent is, by analogy with cot(), the ratio of cosh() and sinh():
(1)Error Conditions
260  Domain error happens when taking coth() of a complex number in degree or gradian mode.
Related Commands
Takes the hyperbolic tangent of a number.
tanh(value)
Menu Location
 Press 2nd MATH to enter the MATH menu.
 Press C to enter the Hyperbolic submenu.
 Press 3 to select tanh(.
This command works on all calculators.
1 byte
The tanh() command returns the hyperbolic tangent of a number.
As long as the calculator is in radian mode, tanh() can be used with complex numbers according to the rule that tanh(ix)=tan(x)*i and tan(ix)=tanh(x)*i. This rule only works in radian mode, and tanh() of a complex number will return a domain error when working in degrees or gradians.
Occasionally, tanh() can compute an exact result; most of the time, the calculator will leave an expression with tanh() alone unless it's in approximate mode (or you force an approximation). When tanh() is used with symbolic expressions, the calculator can go back and forth between the tanh() expression and its exponential equivalent.
:tanh(0)
0
:expand(tanh(x))
12/((e^x)^2+1)
:comDenom(12/((e^x)^2+1))
tanh(x)
If tanh() is applied to a list, it will take the hyperbolic tangent of every element in the list.
Advanced Uses
The tanh() of a matrix is not (in general) the same as taking the hyperbolic tangent of every element of the matrix. A different definition is used to compute the result; see Matrices and Their Commands. It requires the matrix to be square and diagonalizable in order to apply.
Formulas
The definition of hyperbolic cotangent is, by analogy with tan(), the ratio of sinh() and cosh():
(1)Error Conditions
230  Dimension happens when taking tanh() of a matrix that isn't square.
260  Domain error happens when taking tanh() of a complex number in degree or gradian mode.
665  Matrix not diagonalizable happens when taking tanh() of a matrix that isn't diagonalizable.
Related Commands
Takes the hyperbolic sine of a number.
sinh(value)
Menu Location
 Press 2nd MATH to enter the MATH menu.
 Press C to enter the Hyperbolic submenu.
 Press 1 to select sinh(.
This command works on all calculators.
1 byte
The sinh() command returns the hyperbolic sine of a number.
As long as the calculator is in radian mode, sinh() can be used with complex numbers according to the rule that sinh(ix)=sin(x)*i and sin(ix)=sinh(x)*i. This rule only works in radian mode, and sinh() of a complex number will return a domain error when working in degrees or gradians.
Occasionally, sinh() can compute an exact result; most of the time, the calculator will leave an expression with sinh() alone unless it's in approximate mode (or you force an approximation). When sinh() is used with symbolic expressions, the calculator can go back and forth between the sinh() expression and its exponential equivalent.
:sinh(0)
0
:expand(sinh(x))
e^x/21/(2*e^x)
:comDenom(e^x/21/(2*e^x))
sinh(x)
If sinh() is applied to a list, it will take the hyperbolic sine of every element in the list.
Advanced Uses
The sinh() of a matrix is not (in general) the same as taking the hyperbolic sine of every element of the matrix. A different definition is used to compute the result; see Matrices and Their Commands. It requires the matrix to be square and diagonalizable in order to apply.
Formulas
The definition of hyperbolic sine is given in terms of exponents:
(1)Error Conditions
230  Dimension happens when taking sinh() of a matrix that isn't square.
260  Domain error happens when taking sinh() of a complex number in degree or gradian mode.
665  Matrix not diagonalizable happens when taking sinh() of a matrix that isn't diagonalizable.
Related Commands
Takes the hyperbolic cosine of a number.
cosh(value)
Menu Location
 Press 2nd MATH to enter the MATH menu.
 Press C to enter the Hyperbolic submenu.
 Press 2 to select cosh(.
This command works on all calculators.
1 byte
The cosh() command returns the hyperbolic cosine of a number.
As long as the calculator is in radian mode, cosh() can be used with complex numbers according to the rule that cosh(ix)=cos(x) and cos(ix)=cosh(x). This rule only works in radian mode, and cosh() of a complex number will return a domain error when working in degrees or gradians.
Occasionally, cosh() can compute an exact result; most of the time, the calculator will leave an expression with cosh() alone unless it's in approximate mode (or you force an approximation). When cosh() is used with symbolic expressions, the calculator can go back and forth between the cosh() expression and its exponential equivalent.
:cosh(0)
1
:expand(cosh(x))
e^x/2+1/(2*e^x)
:comDenom(e^x/2+1/(2*e^x))
cosh(x)
If cosh() is applied to a list, it will take the hyperbolic cosine of every element in the list.
Advanced Uses
The cosh() of a matrix is not (in general) the same as taking the hyperbolic cosine of every element of the matrix. A different definition is used to compute the result; see Matrices and Their Commands. It requires the matrix to be square and diagonalizable in order to apply.
Formulas
The definition of hyperbolic cosine is given in terms of exponents:
(1)Error Conditions
230  Dimension happens when taking cosh() of a matrix that isn't square.
260  Domain error happens when taking cosh() of a complex number in degree or gradian mode.
665  Matrix not diagonalizable happens when taking cosh() of a matrix that isn't diagonalizable.
Related Commands
Member
Pauses the program until ENTER is pressed, optionally displaying text on the I/O screen.
:Pause [expression]
Menu Location
Starting in the program editor:
 Press F2 to enter the Control menu.
 Press 8 to enter the Transfers submenu.
 Press 1 to select Pause.
This command works on all calculators.
3 bytes
Used by itself without parameters, Pause temporarily suspends the program until the ENTER key is pressed, displaying an indicator to that effect in the lower right corner of the screen. When ENTER is pressed, the program continues running from the next command in order.
Pause can also be given any expression as a parameter. In this case, it will display the expression on a new line on the Program I/O screen (just like Disp), and then pause the program as above. Unlike Disp, however, it can only display one thing.
Optimization
Make sure to give Pause an argument if using it with Disp:
:Disp x
:Pause
can be
:Pause x
Related Commands
Takes the factorial of a number.
number!
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
1 byte
The ! operator takes the factorial of a number: for a positive, whole number, n! is defined as n*(n1)*(n2)*…*3*2*1. As a special case, 0! is defined to be 1.
The factorial has a special meaning in combinatorics: n! is the number of ways you can order n objects. For instance, 3!=6 because there are 6 ways to order 3 objects:
 A B C
 A C B
 B A C
 B C A
 C A B
 C B A
As can be expected, factorials get very large very quickly. The calculator can only compute an exact integer result for factorials up to 299!, and an approximate result for factorials up to 449!. Beyond that, the numbers involved are replaced by ∞ (infinity) in expressions.
While there are some formulas to define factorials of noninteger values, the calculator doesn't use them. It will leave an expression like (1/2)! unsimplified. However, the factorial of a number less than or equal to 1 will be "undef".
:5!
120
:299!
1020191707388... (600 more digits)
:449!
3.85193e997
:(2)!
undef
Related Commands
See Also
Used in entering a vector in polar, cylindrical, or spherical format, or a complex number in polar form.
[r,∠θ]
[r,∠θ,z]
[r,∠θ,∠φ]
(r∠θ)
Menu Location
 Press 2nd MATH to enter the MATH menu.
 Press 2 to enter the Angle submenu.
 Press 7 to select ∠.
This command works on all calculators.
1 byte
The ∠ operator is used for alternate forms of entering vectors or complex numbers. It will be used for output depending on the Complex Format and Vector Format mode settings, but you can always use it in an expression.
For vectors (which are just 1x2 or 1x3 matrices, as far as ∠ is concerned):
 [r,∠θ] is equivalent to [r*cos(θ),r*sin(θ)]
 [r,∠θ,z] is equivalent to [r*cos(θ),r*sin(θ),z]
 [r,∠θ,∠φ] is equivalent to [r*cos(θ)*sin(φ),r*sin(θ)*sin(φ),r*cos(φ)]
These have to be row vectors — you can't use column vectors with ∠.
For complex numbers, (r∠θ) is equivalent to r*(cos(θ)+i*sin(θ)). You have to have the parentheses there, and both r and θ must be real numbers or expressions.
Error Conditions
260  Domain error happens when complex numbers are used in the vector notation.
580  Invalid polar complex happens when the values of r and θ in the complex number notation are invalid.
640  Invalid vector syntax happens when the ∠ mark is misplaced in the vector notation.
Related Commands
Divides a number by 100.
number%
Menu Location
 Press 2nd CHAR to enter the CHAR menu.
 Press 3 to enter the Punctuation submenu.
 Press 5 to select %.
This command works on all calculators.
1 byte
The % operator is a cheap shortcut for dividing a number by 100: for instance, 25% = 25/100 = 1/4. When used on a list or matrix, it divides every element by 100.
It's somewhat higher in priority than regular division, so you don't need parentheses as often with it: for instance, 4^50% is equal to 4^(1/2)=2, not to (4^50)%.
Related Commands
See Also
Takes the square root of a number.
√(number)
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
1 byte
The √() command takes the square root of a value: √(x) is a number that, when multiplied by itself, gives x. It's a special case of the ^ and root() commands: √(x) = x^(1/2) = root(x,2).
Unless the calculator is in approximate mode, or you force it to approximate (by pressing ♦+ENTER, or using approx()), it won't try to evaluate all square roots: it will take the square root of perfect squares, otherwise, it will just take out all the square factors (for instance, √(20) is simplified to 2√(5)).
For positive numbers, √() will return the positive square root; more generally, if the result is complex (and if the calculator is in complex number mode), the result of √() will be the one with nonnegative real part.
:√(16)
4
:√(12)
2*√(3)*i
If the square root of a list is taken, it will take the square root of every element of the list.
Advanced Uses
The √() of a matrix is not (in general) the same as taking the square root of every element of the matrix. A different definition is used to compute the result; see Matrices and Their Commands. It requires the matrix to be square and diagonalizable in order to apply.
Error Conditions
230  Dimension happens when taking the square root of a nonsquare matrix.
665  Matrix not diagonalizable happens when diagonalization (used to take square roots of matrices) fails.
800  Nonreal result happens when taking the square root of a negative or complex number, in real number mode.
Related Commands
Raises a value to a power, doing this elementbyelement for matrices.
base .^ exponent
Menu Location
 Press 2nd MATH to enter the MATH menu.
 Press 4 to enter the Matrix submenu.
 Press K to enter the Element ops submenu.
 Press 1 to select .+.
…frankly, just typing it is way easier.
This command works on all calculators.
1 byte
The .^ operator is generally the same as ^, except when dealing with matrices. While ^ does quite a lot of matrixspecific stuff (check out its page for more information), .^ just applies it elementbyelement:
:[a,b;c,d] .^ 2
[a^2 b^2]
[c^2 d^2]
The command can handle any choice of matrix and scalar as the base and exponent. However, if you're raising a constant number to a matrix power, be careful that the dot in .^ is not confused for a decimal point, by adding extra spaces:
:2.^[a,b;c,d]
Error: Data type
:2 .^ [a,b;c,d]
[2^a 2^b]
[2^c 2^d]
Although this doesn't come up often, be aware that .^, like ^, is evaluated from right to left: a.^b.^c is calculated as a.^(b.^c), not as (a.^b).^c.
Error Conditions
240  Dimension mismatch happens when a matrix is raised to the power of another matrix, with different dimensions.
Related Commands
See Also
Divides two values, doing so elementbyelement for two matrices.
value ./ value
Menu Location
 Press 2nd MATH to enter the MATH menu.
 Press 4 to enter the Matrix submenu.
 Press K to enter the Element ops submenu.
 Press 4 to select ./.
…frankly, just typing it is way easier.
This command works on all calculators.
1 byte
The ./ operator works just like / in most cases. The only exception is with matrices. The / command can't do anything with then (except for dividing a matrix by a value), but ./ will just apply the operation elementbyelement. Obviously, when this is done for two matrices, their dimensions have to match up.
:[a,b;c,d] ./ [e,f;g,h]
[a/e b/f]
[c/g d/h]
When dividing a constant number by a matrix with ./, you may need to space it out so that there's no confusion between ./ and a decimal point.
:1./[a,b;c,d]
Error: Data type
:1 ./ [a,b;c,d]
[1/a 1/b]
[1/c 1/d]
Error Conditions
240  Dimension mismatch happens when dividing a matrix by another matrix of a different size.
Related Commands
See Also
Multiples two values, using elementbyelement multiplication for two matrices.
value1 .* value2
Menu Location
 Press 2nd MATH to enter the MATH menu.
 Press 4 to enter the Matrix submenu.
 Press K to enter the Element ops submenu.
 Press 3 to select .*.
…frankly, just typing it is way easier.
This command works on all calculators.
1 byte
In most cases, .* does the same thing as *. The difference only applies to multiplying two matrices. Whereas * uses the linearalgebra definition (see its article for details), .* does the simple thing and multiplies the matrices element by element (obviously, they must match in size for this to work).
:[1,2;3,4] .* [a,b;c,d]
[a 2*b]
[3*c 4*d]
Error Conditions
240  Dimension mismatch happens when the matrices being multiplied don't match in size.
Related Commands
See Also
Subtracts two values, using elementbyelement subtraction when subtracting a matrix and a number.
value1 . value2
Menu Location
 Press 2nd MATH to enter the MATH menu.
 Press 4 to enter the Matrix submenu.
 Press K to enter the Element ops submenu.
 Press 2 to select ..
…frankly, just typing it is way easier.
This command works on all calculators.
1 byte
The . command works like plain  in most cases, taking the difference of two values. It's distinguished by its application to matrices: in particular, when subtracting a matrix and a scalar (in either order). Normally, the operation will be done along the main diagonal only: as though the value were multiplied by the identity matrix. However, . does the more intuitive thing (for anyone but an algebraist, anyway) and subtracts the value from every element of the matrix (or, if the matrix is being subtracted, subtracts every element from the scalar value).
:[a,b;c,d]x
[x+a b ]
[c x+d]
:[a,b;c,d].x
[x+a x+b]
[x+c x+d]
It doesn't really make much sense to use . to add other kinds of values, but you can do it if you like.
When subtracting a matrix from a constant number, be warned that the . may be interpreted as a decimal point. You can put spaces to help the calculator figure out what you mean.
:5.[a,b;c,d]
[a+5. b ]
[c d+5.]
:5 .+ [a,b;c,d]
[a+5 b+5]
[c+5 d+5]
Related Commands
Adds two values, using elementbyelement addition when adding a matrix and a number.
value1 .+ value2
Menu Location
 Press 2nd MATH to enter the MATH menu.
 Press 4 to enter the Matrix submenu.
 Press K to enter the Element ops submenu.
 Press 1 to select .+.
…frankly, just typing it is way easier.
This command works on all calculators.
1 byte
The .+ command works like plain + in most cases, adding two values together. It's distinguished by its application to matrices: in particular, when adding a matrix and a scalar. Normal addition of a matrix and a single value will add that value along the main diagonal only: as though the value were multiplied by the identity matrix. However, .+ does the more intuitive thing (for anyone but an algebraist, anyway) and adds the value to every element of the matrix.
:[a,b;c,d]+x
[x+a b ]
[c x+d]
:[a,b;c,d].+x
[x+a x+b]
[x+c x+d]
It doesn't really make much sense to use .+ to add other kinds of values, but you can do it if you like.
Although the order of the matrix and the scalar doesn't matter, be warned that in some cases, the . will be interpreted as a decimal point. You can put spaces to help the calculator figure out what you mean.
:5.+[a,b;c,d]
[a+5. b ]
[c d+5.]
:5 .+ [a,b;c,d]
[a+5 b+5]
[c+5 d+5]
Related Commands
Negates an expression.
‾expression
Menu Location
Press the ‾ key to enter ‾.
This command works on all calculators.
1 byte
The ‾ operator gives the negative of the value immediately following it. It's not to be confused with the  operator, which subtracts two numbers — while on paper you'd generally use the same symbol for 2 and 42, the calculator has two different symbols, and negation is represented by the slightly shorter and higher dash.
You can also use ‾ to negate lists and matrices, which will negate each element, as expected.
:1+‾1
0
:‾(x1)
‾x+1
:‾[1,2;3,4]
[‾1 ‾2]
[‾3 ‾4]
Other pages on this site will use  to mean both subtraction and negation, where it isn't confusing.
Related Commands
See Also
Marks the rest of the line (in a program) as a comment.
:line of code © comment
Menu Location
Starting in the program editor:
 Press F2 to enter the I/O menu.
 Press 9 to select ©.
This command works on all calculators.
4 bytes (+ length of comment)
The © character is used for adding comments in a program: everything after © is ignored by the calculator for the purposes of actually running the program, so it's a good way to make a note to yourself about what a part of your code does. This is especially helpful if you're going to be reading the program later when you don't quite remember what you were doing.
:If ok=0 © If the user pressed ESC
: Stop
There are other situations you might use comments in. For instance, you might make a rough sketch of your program and add comments about the code that has yet to be filled in:
:If key=264 Then
: © add a confirmation dialog here later
: Exit
:EndIf
Yet another use of © is to "comment out" lines of code that you might need later, but want to ignore for now — this is better than deleting the code, since you don't have to rewrite it later.
See Also
Adds an item to a Custom or ToolBar menu.
Item text (with Custom)
Item text,label (with ToolBar)
Menu Location
Starting in the program editor:
 Press F3 to enter the I/O menu.
 Press 1 to enter the Dialog submenu.
 Press 8 to select Item.
This command works on all calculators.
3 bytes
The Item command is used in Custom..EndCustm and ToolBar..EndTBar blocks (both of which create toolbar menus) to add an option to one of the tabs. See these commands for more details on how to use it.
Inside a Custom..EndCustm menu, the correct syntax is Item text (text being a string). This will display text for the menu option, and also paste text every time the option is selected.
Inside a ToolBar..EndTBar menu, the correct syntax is Item text,label. This will, as in the previous case, display text for the menu option; when the option is selected, the program will resume running from Lbl label.
Error Conditions
130  Argument must be a string happens when the option text isn't a string.
500  Invalid label happens when the label doesn't exist (in this program), when the option is selected.
Related Commands
Sets the default date format.
setDtFmt(formatnumber)
Menu Location
This command can't be found in any menu besides the command catalog.
This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI89 Titanium or Voyage 200 calculator)
3 bytes
The setDtFmt() sets the default format for dates: this format is used in the top right corner of the Apps Desktop, and also as the format for the output of getDtStr() (when it's used without a parameter to override this setting).
The eight possible formats each have a number associated to them, which is the number you should pass to setDtFmt(). It will return the number of the previous setting, which is convenient if you want to restore it later.
The eight formats are as follows (dd, mm, and yy are the date, month, and year respectively, in two digits)
Format Number  Date Format 

1  "mm/dd/yy" 
2  "dd/mm/yy" 
3  "mm.dd.yy" 
4  "dd.mm.yy" 
5  "yy.mm.dd" 
6  "mmddyy" 
7  "ddmmyy" 
8  "yymmdd" 
Typically, you'd only use this command in a program if you needed to use getDtStr() many times with the same format. In that case, save the return value of setDtFmt(), and use it to restore the date format at the end of the program.
Error Conditions
40  Argument error happens when the format number is not an integer in the range 18.
Related Commands
Returns the current default date format.
getDtFmt()
Menu Location
This command can't be found in any menu besides the command catalog.
This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI89 Titanium or Voyage 200 calculator)
3 bytes
The getDtFmt() returns the number of the current default date format for getDtStr() (that is, the format that getDtStr() with no parameters will use). This same format is also used to display the time in the corner of the Apps Desktop.
The eight formats are as follows (dd, mm, and yy are the date, month, and year respectively, in two digits)
Format Number  Date Format 

1  "mm/dd/yy" 
2  "dd/mm/yy" 
3  "mm.dd.yy" 
4  "dd.mm.yy" 
5  "yy.mm.dd" 
6  "mmddyy" 
7  "ddmmyy" 
8  "yymmdd" 
In a program, it's usually unnecessary to use getDtFmt(). Most of the time, you'll just use getDtStr() with a format already specified; in the rare exceptions where you need to use getDtStr() a lot with the same format, you'd use setDtFmt() to pick the format you want, save the result, and use it to restore the date format at the end of the program.
Related Commands
Returns the current date in a string.
getDtStr([format])
Menu Location
This command can't be found in any menu besides the command catalog.
This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI89 Titanium or Voyage 200 calculator)
3 bytes
The getDtStr() command returns the current date in a string. The date can be in one of eight formats, numbered from 1 to 8. This format can be given to getDtStr() directly: for instance, getDtStr(5) will return the date in the fifth format. Or, you can set a default format with the setDtFmt() command, and getDtStr() will use that format when it's not given a specific format to use.
The eight formats are as follows (dd, mm, and yy are the date, month, and year respectively, in two digits)
Format Number  Result of getDtStr() 

1  "mm/dd/yy" 
2  "dd/mm/yy" 
3  "mm.dd.yy" 
4  "dd.mm.yy" 
5  "yy.mm.dd" 
6  "mmddyy" 
7  "ddmmyy" 
8  "yymmdd" 
Formats 5 and 8 are useful in that if you store dates in either of those format, sorting the strings will sort the dates in chronological order.
Error Conditions
40  Argument error happens when the date format given is not an integer 18.
Related Commands
Choosing a good variable name is important. The calculator gives you eight characters of freedom in choosing a variable name, which can be put to good use by describing the purpose of the variable, or it can be wasted by naming the variable "bobby".
Choosing good variable names helps you when you're writing the program, because then you'll be less likely to forget which variable does what. When you're done writing it, it helps other people looking at the program for whichever reason, even if it's just curiosity. Unfortunately, there's a powerful incentive to stick to short variable names: it can reduce the program size a lot, since referring to a variable called "n" takes 1 byte, and referring to a variable called "numusers" takes 10 bytes. Whether readability or size is more important is up to you, but at the very least you should stick to descriptive names when you're still writing the program.
This article has three sections. The first section describes the characters that can make up a variable name. In the second section, you'll learn about some special variable names that the calculator will treat differently. Finally, the third section contains some tips on how to choose a good name for a variable.
Possible Variable Names
A variable name can have between 1 and 8 characters in it. Of the 255 possible characters (see Character Codes), only some can be used in variable names:
 Obviously, the letters az. These are caseinsensitive: the calculator can't tell between the names "anumber", "aNumber", and "AnUMbEr".
 The numbers 09. These can't begin a variable name, since something like 1xyz is interpreted as 1*xyz, but they're fine anywhere else.
 International characters, like Ç or Þ. These are also caseinsensitive, in the cases where there's an uppercase and a lowercase variant.
 Greek letters (except for π, which is a constant). These are case sensitive: Ω is not the same variable as ω, even though they're both the same letter (omega).
 The underscore, _. This one's a bit weird, for reasons you'll see in the next section. It can't be used by itself as a singlecharacter variable, and if it's the first character in the name, then it can't appear again: a_b_c will be treated as a single variable, but _a_b will be broken up as the product _a*_b.
Of course, the builtin commands and system variables are excluded from variable names, since their meaning is already defined.
Special Variable Names
In order from least to most interesting:
 The oneletter variables az
 stand out because they only take one byte to access (normally, you need (# of characters + 2) bytes, so 3 bytes for Ω and 10 bytes for varomega). They also get deleted by NewProb and by the relevant menu option on the home screen.
 kbdprgm1() through kbdprgm9()
 can be quickly accessed by pressing ♦ (the diamond key) and the corresponding number, as long as they are defined to be programs. On the TI89 Titanium and Voyage 200, kbdprgm7() and kbdprgm9() get hijacked, since ♦+7 and ♦+9 are the shortcuts to entering log( and root( respectively. Otherwise, ♦+# will run kbdprgm#() immediately, without even entering it on the home screen.
 Variables ending in _
 are assumed to be complex by math commands. Normally, an undefined variable is assumed real: for instance, real(x) returns x, and imag(x) returns 0. This isn't done for, say, x_. The most useful application for this is when solving for a variable with solve() or cSolve().
 Variables beginning with _
 are userdefined units (suitable for use with ▶, setUnits(), and getUnits()). More importantly, you don't have to use them as units, but they do transcend folders. If you store 5 to _x, then _x will return 5 no matter what the current folder is, until you delete it. The drawback is that these variables can't store functions or programs.
Choosing Appropriate Names
Good variable names don't have to be long. In fact, there are situations completely unsuited to long variable names. If you're defining a simple function, a good name for its input is just x. And the variable inside a seq() command doesn't need to be long, considering that it's only relevant for one line. In general, long descriptive names are unnecessary if the variable is only going to be around for a short while.
For some particular cases, there's a traditionally used variable name. For instance, the index variable of a For..EndFor loop is usually named i (if there's a second loop inside it, you might name it j). The result of getKey() may be called key or k.
It's always good if the variable name has some indication of its type. This is especially important for list variables, because optimized code for lists looks the same as optimized code for numbers, and in the code :x+1→x it's unclear if x is a number or a list. This is also important for the arguments of a function, since these are the first place you'd look to figure out how to use the function. It's unclear to use a function defined as getindex(a,b) — something like getindex(list,item) is better.
For coordinates on screen, use (x,y) coordinates for point commands (e.g. PtOn) and (row,column) coordinates for pixel commands (e.g. PxlOn). If you have a pair of variables for the coordinates, make sure to indicate which coordinate is which: for instance, shipx and shipy, or shipr and shipc. This does several jobs at once: it shows that the variables are paired, which variable is which, and which type of coordinate is being used.
For subroutine names, using verbs is helpful: there's little doubt about what a routine called findmax() or drawmenu() does. If a function returns a truth value, model it off commands such as isPrime() and isClkOn() — there's no doubt about which option is true, and which is false. If you're trying to tell red things apart from blue things, isblue() is a better name than chkcolor().
For the most part, the variable name is only a question of style. However, there are several cases in which the user of the program gets to see the name of a variable. In such cases, you should take extra care to make sure that the variable name makes sense. These cases are:
 When asking for a value with Prompt. In general, this makes sense if you're entering the values of variables in a known equation: When solving for x in x=a*sin(2πω), you might as well name the variables x, a, and ω, and ask for their values. If it's not clear what a variable name means, use Input instead.
 When using icons in a ToolBar menu. On a TI89 or TI89 Titanium, the icon will not show up: the name of the picture variable will, instead. Since it's possible your program might one day end up on one of those calculators, make the icon names helpful.
 The program name itself. It's hard to think of something snappy and memorable in 8 characters, but this goes a long way to making the program usable.
Checks if the hardware clock is turned on.
isClkOn()
Menu Location
This command can't be found in any menu besides the command catalog.
This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI89 Titanium or Voyage 200 calculator)
3 bytes
The isClkOn() command checks if the calculator's clock (which is used by most time and date commands) is running or stopped. The result of isClkOn() is a truth value — true if the clock is on, and false if the clock is off — which makes it perfect for a condition in commands such as If:
:If isClkOn() Then
: Disp "Clock is running."
:Else
: Disp "Clock is stopped."
:EndIf
The isClkOn() command, though useful, isn't often called for. For instance, there's no need to check if the clock is on if you're planning to turn it on anyway:
:If not isClkOn()
: ClockOn
should just be
:ClockOn
One use for isClkOn() is in functions, which aren't allowed to change the global status of the calculator with commands like ClockOn or ClockOff. Instead, you might do the next best thing, and return an error message if the clock is turned off.
Related Commands
Turns on the hardware clock.
ClockOn
Menu Location
This command can't be found in any menu besides the command catalog.
This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI89 Titanium or Voyage 200 calculator)
2 bytes
The ClockOn command turns on the calculator's clock, used by most time and date commands. Only when the clock is on, will the value returned by startTmr(), getTime(), and other commands actually change with the passage of time. If you write a program that uses any of these commands, be sure to include this command at the beginning of the program.
Since it modifies the global status of the calculator, ClockOn can't be used inside a function. If you're writing a function that depends on measuring time (so you need the clock to be on), the best thing you can do is use the isClkOn() command to check if the clock is on or off, and return an error message if it's off.
Error Conditions
450  Invalid in a function or current expression happens when ClockOn is used in a function.
Related Commands
Turns off the hardware clock.
ClockOff
Menu Location
This command can't be found in any menu besides the command catalog.
This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI89 Titanium or Voyage 200 calculator)
2 bytes
The ClockOff Command turns off the calculator's clock as far as the time and date commands are concerned: that is, the timer used by startTmr(), getTime(), and other commands will not keep updating every second, but will stay the same until the clock is turned on again.
It's not usually a good idea to use this in a program: there's no real benefit to doing so (it doesn't make the calculator run faster or anything like that) but there's the real drawback that it throws off the calculator's time. However, the mere existence of this command means that you should probably use ClockOn anytime you need to use the time and date commands.
Since it modifies the global status of the calculator, ClockOff can't be used in a function.
Error Conditions
450  Invalid in a function or current expression happens when ClockOff is used inside a function.
Related Commands
Takes the integral of an expression.
∫(expression,variable)
∫(expression,variable,constant)
∫(expression,variable,lower,upper)
Menu Location
Press [2nd][7] to enter ∫(.
This command works on all calculators.
2 bytes
∫(expression,variable) takes the integral of expression (symbolically) with respect to variable. All other variables are treated as constant.
There are three ways to use ∫(). The syntax above returns an indefinite integral. ∫(expression,variable,c) does the same, but with a constant of integration, c (this will just get added on to the result). Finally, ∫(expression,variable,a,b) takes a definite integral from a to b. These limits can be anything, including undefined variables, ∞ and ∞, as long as they don't depend on variable.
:∫(x^2,x)
x^3/3
:∫(x^2,x,c)
x^3/3+c
:∫(x^2,x,a,b)
b^3/3a^3/3
Indefinite integrals are always computed exactly or not at all: if a part of the expression (or the entire expression) can't be integrated, the result will stay in terms of ∫(). However, definite integrals will sometimes be approximated, depending on the Exact/Approx mode setting:
 If EXACT, integrals will never be approximated.
 If AUTO, the calculator will approximate integrals like ∫(e^(x^2),x,1,1) that it can't compute exactly.
 If APPROX, all definite integrals will be done numerically if possible.
:∫(e^(x^2),x)
∫(e^(x^2),x)
:∫(e^(x^2),x,1,1)
2*∫(e^(x^2),x,0,1) (in EXACT mode)
1.49365 (in AUTO or APPROX mode)
Finally, you can take multiple integrals by applying ∫() to the result of another ∫() (any number of times). The integration limits of the inner integrals can involve the variables of the outer integrals.
:∫(∫(x*y,x),y)
y^2*x^2/4
:∫(∫(x*y,x,0,y),y,0,1)
1/8
If the expression is a list or matrix, ∫() takes the integral of each element.
Error Conditions
140  Argument must be a variable name happens when the variable of integration isn't a variable.
220  Dependent limit happens when the integration limits depend on the variable of integration.
Related Commands
Aug  09 —  The entire TIBasic Developer has 1664 total pages today. 
Asks for a value to be typed in on the I/O screen.
Input [prompt,]variable
Input
Menu Location
Starting in the program editor:
 Press F3 to enter the I/O menu.
 Press 3 to select Input.
This command works on all calculators.
3 bytes
Input prompt, variable displays prompt (which should be a string) on a new line on the Program I/O screen, then waits for the user to type in an expression on the next line. Whatever is typed in is then stored to variable. You can leave out the prompt part to just have the prompt be a question mark.
Note that whatever is typed in will be interpreted very literally: you'll need { } brackets to enter a list, quotes to enter a string, and so on. If you do want to enter a string, InputStr is probably a better choice.
Prompt is a special case of Input: Prompt variable works just as Input does, with variable? (the variable name, and a question mark) as the prompt.
If there's an error (for example, a syntax error) in the line that got typed in, the calculator will display the appropriate error message, and ask for the line to be typed in again: the program will continue running as usual. The calculator can even be turned off while Input is running; when it's turned back on, it will continue waiting for input, and then the program will still continue running.
Advanced Uses
Another use of Input is without any parameters at all: Input by itself will display a cursor on the graph screen, and wait until a point is selected (the cursor can be moved left and right as usual, and a point is selected by pressing ENTER).
You can find out which point was selected by using the xc and yc system variables (xc is the xcoordinate, and yc is the ycoordinate). The Coordinates graph setting determines other behavior:
 If it's set to RECT, the values of xc and yc will be displayed at the bottom of the screen when the point is being selected.
 If it's set to POLAR, the polar coordinates will be stored to system variables rc and θc (in addition to the regular coordinates). The values of rc and θc will be displayed while the point is being selected.
 If it's set to OFF, no coordinates will be displayed (although xc and yc will still contain the resulting coordinate).
If Input is located inside a Try..EndTry block, and the ON key is pressed, the "Break" error will be caught (one of the only times this happens). If you're a nice person, you can use this to add code to exit quietly (without an error message) when ON is pressed. If you're not a nice person, you can use this to create an infinite loop you can't use ON to break out of.
Related Commands
Aug  08 —  Milestone: 100 command pages have been written (Goal: to finish them all by November) 
Supplies the title text in one of several types of menus.
Title text
or (with ToolBar only)
Title textoricon[,label]
Menu Location
Starting in the program editor:
 Press F3 to enter the I/O menu.
 Press 1 to enter the Dialog submenu.
 Press 7 to select Title.
This command works on all calculators.
3 bytes
The Title command is used in different ways with several types of menus:
 Inside a Dialog..EndDlog block, it gives the title text for the dialog.
 Inside a ToolBar..EndTBar or Custom..EndCustm block, it gives a title for a tab.
Usually, all that the Title command wants is a string that will be used for the title (the string() command might be useful for other data types). The exception is ToolBar: then, if the tab has no options under it, Title should also have a label to jump to when that tab is selected.
Advanced Uses
On the widescreen calculators (the TI92, TI92 Plus, and Voyage 200), a Toolbar tab can have a picture for a title (the result will look like the F1 tab of the default toolbar menu). To do so, create a 17x17 picture to be used as the icon, and use the picture variable in place of the tab's title string. If this syntax is used on a TI89 or TI89 Titanium calculator, the name of the variable will be displayed instead of the icon (the check for the picture size is still done, and will cause an error if it's the wrong size).
Error Conditions
120  Argument must be a Pic or string happens when the title text is the wrong data type (in a toolbar).
130  Argument must be a string happens when the title text is the wrong data type (in a dialog).
230  Dimension happens when the icon (in a toolbar) is the wrong size.
530  Invalid outside Dialog..EndDlog, Custom..EndCustom, or Toolbar..EndTBar blocks happens when Title is used by itself, outside a menu declaration.
Related Commands
See Also
Creates a toolbar menu and waits for input.
:ToolBar
(list of titles and items)
:EndTBar
Menu Location
Starting in the program editor:
 Press F3 to enter the I/O menu.
 Press 1 to enter the Dialog submenu.
 Press 6 to select ToolBar..EndTBar.
This command works on all calculators.
2 bytes for ToolBar;
2 bytes for EndTBar.
A ToolBar..EndTBar block, usable only inside a program, displays a custom toolbar menu in place of the usual toolbar, and immediately asks for one of the options to be selected. Selecting an object transfers program flow to a label somewhere else in the program.
The toolbar menu can have up to eight tabs (on certain models, there is no upper limit, i.e. TI92), which correspond to the F1F8 keys, with any number of options under each tab, or none at all. These are defined by putting the Title and Item commands inside the ToolBar..EndTBar block.
The Title command indicates a new tab, so you can have up to eight of these. After Title, put a string to be displayed for the tab. If the tab doesn't have any options under it, you should also add a label that selecting this tab will jump to.
The Item command indicates an option under the most recent tab — you can have as many items as you like, or none at all. As with Title, you should give Item a name (which will be displayed as the option) and a label that the program will jump to if the option is selected.
Here is an example of the syntax:
:ToolBar
: Title "Animals"
: Item "Dog",lab1
: Item "Cat",lab2
: Title "Rocks",lab3
: Title "Plants"
: Item "Grass",lab4
: ...
:EndTBar
In this case, the custom toolbar will display  F1 Animals  F2 Rocks  F3 Plants  … . Pressing F1 would bring up the Animals menu with items 1:Dog and 2:Cat. Then, pressing 1 or ENTER would continue the program from Lbl lab1. Pressing F2 would immediately jump to Lbl lab3, since that tab has no items.
A related command is Custom..EndCustm. It also creates a toolbar menu, but one that's intended for use as a custom menu outside a program.
Advanced Uses
On the widescreen calculators (the TI92, TI92 Plus, and Voyage 200), a tab can have a picture for a title (the result will look like the F1 tab of the default toolbar menu). To do so, create a 16x16 (e.g.[0,0;15,15])picture to be used as the icon, and use the picture variable in place of the tab's title string. If this syntax is used on a TI89 or TI89 Titanium calculator, the name of the variable will be displayed instead of the icon (the check for the picture size is still done, and will cause an error if it's the wrong size).
Error Conditions
230  Dimension happens when an icon is used of the wrong size.
450  Invalid in a function or current expression happens when ToolBar..EndTBar is used in a function.
480  Invalid in ToolBar..EndTBar block happens when any command other than Title or Item is used inside the block.
590  Invalid syntax block happens when the syntax is somehow wrong (e.g. an item has no label).
Related Commands
Indicates that a number is written in hexadecimal.
0hdigits
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
2 bytes
The calculator can work with numbers written in three bases: decimal (the usual), binary, and hexadecimal. The 0h command indicates that a number is written in hexadecimal:
:0h10
16
:0h2F6
758
When written in hexadecimal, numbers are expressed as signed 32bit integers (32 bits correspond to 8 hexadecimal digits), which means that only the integers between 2^{31} and 2^{31}1 can be expressed in hexadecimal. With other hexadecimalrelated commands, numbers are simply truncated to fit in this range. Not so with 0h: if you enter more than 8 hexadecimal digits after the 0b, the result is a domain error.
Even if the calculator is in hexadecimal mode, you still have to write 0h for an integer to be interpreted as hexadecimal: the mode setting only affects output. If the calculator is in decimal mode, which is the default, you have to use ▶Hex to get output in hexadecimal.
Error Conditions
260  Domain error happens when 0h is used with more than 8 hexadecimal digits after it.
Related Commands
Indicates that a number is written in binary.
0bdigits
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
2 bytes
The calculator can work with numbers written in three bases: decimal (the usual), binary, and hexadecimal. The 0b command indicates that a number is written in binary:
:0b101
5
:0b100000
32
When written in binary, numbers are expressed as signed 32bit integers, which means that only the integers between 2^{31} and 2^{31}1 can be expressed in binary. With other binaryrelated commands, numbers are simply truncated to fit in this range. Not so with 0b: if you enter more than 32 binary digits after the 0b, the result is a domain error.
Even if the calculator is in binary mode, you still have to write 0b for an integer to be interpreted as binary: binary mode only affects output. If the calculator is in decimal mode, which is the default, you have to use ▶Bin to get output in binary.
Error Conditions
260  Domain error happens when 0b is used with more than 32 binary digits after it.
Related Commands
Converts an expression from one unit to another.
expression▶units
Menu Location
Press [2nd][▶] to enter ▶: this is
 [2nd][MODE] on a TI89 or TI89 Titanium
 [2nd][Y] on a TI92, TI92 Plus, or Voyage 200
This command works on all calculators.
2 bytes
The ▶ operator converts an expression to a different unit. Usually, this refers to the builtin units (such as _m (meters), _mph (miles per hour, etc.) which you can select from the UNITS menu.
To use it, you must first have the expression on the left in terms of some unit — this is done by multiplying it by that unit. For instance, "5 meters" is written as 5_m or 5*_m (where _m is the unit). You can combine units as well: for instance, 5_m^2 (5 square meters) or 30_km/_hr (30 kilometers per hour).
To convert that into a different unit, type ▶ and then a different unit to convert to (again, you can combine units). For instance, to convert 5 square meters to acres, type 5_m^2▶_acre. (Note: the result will always be expressed as a decimal)
:30_km/_hr▶_m/_s
8.33333*_m/_s
:5_N▶_dyne
500000.*_dyne
You can't use ▶ to convert between units of temperature (degrees Celsius to degrees Fahrenheit, for instance), since the calculator isn't sure if you mean absolute temperature or a change in temperature instead. Use the tmpCnv() and ΔtmpCnv() commands instead.
Advanced Uses
It's possible to define your own units as well: units are just any variable beginning with an underscore, and ▶ will perform just as well converting between those. There are two ways to go about it. The first is to define your units in terms of existing ones: for instance, you might define a furlong (oneeighth of a mile) as follows:
:1/8_mi→_furlong
1/8*_mi
:110_yd▶_furlong
.5*_furlong
The second method is to start with a unit or several units to keep undefined (for instance, _x). You can then define other units in terms of _x, and convert between them:
:5_x→_y
5*_x
:3_y▶_x
15.*_x
:10_x/_s▶_y/_s
2.*_y/_s
Units are treated just like variables, except that they're universal across folders: you can have only one instance of _x, and you can access it as _x no matter which folder you're in. You can use this if you want to define a universal variable to access in any folder: for instance, if you define a program as _prgm(), you can run it with _prgm() from any folder.
Error Conditions
345  Inconsistent units happens when converting between two units that measure different types of quantities (for instance, converting length to time).
Related Commands
See Also
Joined Aug 6 —  guoguo12 does not match any existing user name 
Time Zone: Not given
Returns the integer part of a number.
iPart(value)
Menu Location
 Press 2nd MATH to enter the MATH popup menu.
 Press 1 to enter the Number submenu.
 Press 4 to select iPart(.
This command works on all calculators.
1 byte
The iPart() command returns the integer part of a number (removing all the digits after the decimal). Another way of thinking about it is it rounds a number towards 0: positive numbers get rounded down to an integer, and negative numbers get rounded up to an integer.
There are several other rounding commands available, which work in subtly different ways:
 ceiling() always rounds up to the next higher integer.
 floor() always rounds down to the next lower integer. int() does the same thing as floor().
 round() rounds to any given place value, including to an integer; it rounds up or down, whichever is nearest.
However, iPart() is the only one that has a counterpart fPart() which returns the fractional part of a number. This follows the rule that iPart(x)+fPart(x) always equals x.
Using iPart() on the result of a division — iPart(x/y) — is useful so often that there's a specific command, intDiv(), for doing so.
iPart() can also be applied to complex numbers, lists, and matrices, rounding everything that there is to round in each of them.
:iPart(3)
3
:iPart({π,π})
{3 3}
Related Commands
Returns the ceiling of a number.
ceiling(value)
Menu Location
 Press 2nd MATH to enter the MATH popup menu.
 Press 1 to enter the Number submenu.
 Press 7 to select ceiling(.
This command works on all calculators.
1 byte
The ceiling() command rounds a number up to the nearest integer at least as large as the number. For instance, ceiling(π) returns 4, while ceiling(π) returns 3.
There are several commands available to round a number to an integer in slightly different ways:
 int() and floor() — like ceiling(), but round down instead.
 iPart() — truncates a number to just its integer part (or, if you prefer, rounds a number toward 0).
 round() — rounds to a specific place value, not just to an integer, but round(x,0) will round x to the nearest integer, up or down.
ceiling() can also be applied to complex numbers, lists, and matrices, rounding everything that there is to round in each of them.
:ceiling(3)
3
:ceiling({π,π})
{3 4}
Related Commands
Returns the floor of a number.
floor(value)
Menu Location
 Press 2nd MATH to enter the MATH popup menu.
 Press 1 to enter the Number submenu.
 Press 6 to select floor(.
This command works on all calculators.
1 byte
The floor() command rounds a number down to the nearest integer less than or equal to the number. For instance, floor(π) returns 3, while floor(π) returns 4.
The command is an alias for int(): they do the exact same thing. The calculator prefers using floor() (in fact, int() will be converted to floor() in symbolic expressions); int() is left over from earlier calculator models. Other rounding commands include:
 ceiling() — like floor(), but always rounds up (to the next higher integer).
 iPart() — truncates a number to just its integer part (or, if you prefer, rounds a number toward 0).
 round() — rounds to a specific place value, not just to an integer, but round(x,0) will round x to the nearest integer, up or down.
floor() can also be applied to complex numbers, lists, and matrices, rounding everything that there is to round in each of them.
:floor(3)
3
:floor({π,π})
{4 3}
Related Commands
Returns the floor of a number.
int(value)
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
1 byte
The int() command rounds a number down to the nearest integer less than or equal to the number. For instance, int(π) returns 3, while int(π) returns 4.
The command is an alias for floor(): they do the exact same thing. The calculator prefers using floor() (in fact, int() will be converted to floor() in symbolic expressions); int() is left over from earlier calculator models. Other rounding commands include:
 ceiling() — like floor(), but always rounds up (to the next higher integer).
 iPart() — truncates a number to just its integer part (or, if you prefer, rounds a number toward 0).
 round() — rounds to a specific place value, not just to an integer, but round(x,0) will round x to the nearest integer, up or down.
int() can also be applied to complex numbers, lists, and matrices, rounding everything that there is to round in each of them.
:int(3)
3
:int({π,π})
{4 3}
Related Commands
Clears the graph screen, redrawing any functions, plots, or axes/grid/labels.
ClrDraw
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
2 bytes
The ClrDraw command clears away anything drawn on the graph screen — that is, the result of any of the graphics commands, except for Graph (which you can only clear with ClrGraph). It also leaves alone any functions or plots (which are disabled by FnOff and PlotsOff, respectively), as well as axes, labels, a grid, etc. (which can be disabled by the setGraph() command).
Be warned that it doesn't update the screen. For example, if you run the following program:
:circ()
:Prgm
:Circle 0,0,5
:ClrDraw
:EndPrgm
it will draw a circle and then end on the graph screen with the circle still drawn. The screen will actually update the next time you change something on the graph screen; you can also use DispG to update it (although in the program above, DispHome might be more appropriate).
Related Commands
See Also
Sets the window variables to their default settings.
ZoomStd
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
2 bytes
The ZoomStd command initializes the window variables applicable to the current mode to their default values. These default values are:
 xmin=10, xmax=10, xscl=1 (except in differential equation mode, where xmin=1)
 ymin=10, ymax=10, yscl=1
 xres=2 (in function mode)
 tmin=0, tmax=2π, tstep=π/24 (in parametric mode)
 θmin=0, θmax=2π, θstep=π/24 (in polar mode)
 nmin=0, nmax=10, plotStrt=1, plotStep=1 (in sequence mode)
 eyeθ=20, eyeφ=70, eyeψ=0, xgrid=14, ygrid=14, zmin=10, zmax=10, and ncontour=5 (in 3D mode)
 t0=0, tmax=10, tstep=0.1, tplot=0, ncurves=0, diftol=0.001, and fldres=20 (in differential equation mode)
See the System Variables article for details on what these variables actually do.
Advanced Uses
One common use for ZoomStd is as a prelude to ZoomInt in a program. This makes sure that the window variables are the same each time, which ZoomInt alone doesn't guarantee.
Related Commands
See Also
Displays the results of an earlier statistics command.
ShowStat
Menu Location
 Press 2nd MATH to enter the MATH popup menu.
 Press 6 to enter the Statistics submenu.
 Press 9 to select ShowStat.
This command works on all calculators.
2 bytes
The ShowStat command displays the results of the last regression or summary statistics command in a dialog box. The full list of such commands is: CubicReg, ExpReg, LinReg, LnReg, Logistic, MedMed, OneVar, PowerReg, QuadReg, QuartReg, SinReg, and TwoVar.
For regressions, ShowStat first displays the general form of the regression (for instance, y=a*x+b), then the values of the parameters (a and b, in this case); LinReg also outputs the value of corr, and all of them but MedMed display the value of R^{2}. For OneVar and TwoVar, ShowStat merely displays the list of system variables modified, along with their values.
If there are no statistics to display (for instance, if none of these commands have been used since the calculator was last reset), ShowStat will display "No stat variables" in the dialog box. The calculator also automatically deletes the statistics if the variables they were calculated from are modified or deleted.
ShowStat might not always be the best choice to display these results. For instance, when doing a regression, looking at regeq(x) (assuming x is undefined) will give you the entire equation at once. In a program especially, you might want to display the output in a different way than with ShowStat.
Related Commands
Takes the cosecant of a number (usually, an angle).
csc(angle)
Menu Location
 Press 2nd MATH to enter the MATH popup menu.
 Press A to enter the Trig submenu.
 Press 4 to select csc(.
This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI89 Titanium or Voyage 200 calculator)
1 byte
The csc() command returns the cosecant (the reciprocal of the sine) of an angle measure. Naturally, the result depends on the angle mode the calculator is in: radian, degree, or (in AMS version 3.10) gradian. You can also use one of the ^{r}, °, ^{G} marks to specify an angle mode.
The csc() command, along with 11 other trig and hyperbolic functions, was added with AMS version 2.07. It can be easily replaced on earlier versions with 1/sin(x), which is what it simplifies to anyway.
For many common angles, csc() can compute an exact result. Other angles, the calculator will leave alone unless it's in approximate mode (or unless you make it approximate), and then it will give a decimal approximation. As long as the calculator is in radian mode, csc() can be used with complex numbers as well.
:csc(30°)
2
:csc(x)
1/sin(x)
:csc(0)
undef
If csc() is applied to a list, it will take the secant of every element in the list. However, it can't be applied to matrices the way sin() can (this is probably an oversight; all the trig and hyperbolic functions that were present in all AMS versions work with matrices, but the ones added in version 2.07 do not).
Error Conditions
260  Domain error happens when taking csc() of a complex number in degree or gradian mode.
Related Commands
Takes the secant of a number (usually, an angle).
sec(angle)
Menu Location
 Press 2nd MATH to enter the MATH popup menu.
 Press A to enter the Trig submenu.
 Press 5 to select sec(.
This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI89 Titanium or Voyage 200 calculator)
1 byte
The sec() command returns the secant (the reciprocal of the cosine) of an angle measure. Naturally, the result depends on the angle mode the calculator is in: radian, degree, or (in AMS version 3.10) gradian. You can also use one of the ^{r}, °, ^{G} marks to specify an angle mode.
The sec() command, along with 11 other trig and hyperbolic functions, was added with AMS version 2.07. It can be easily replaced on earlier versions with 1/cos(x), which is what it simplifies to anyway.
For many common angles, sec() can compute an exact result. Other angles, the calculator will leave alone unless it's in approximate mode (or unless you make it approximate), and then it will give a decimal approximation. As long as the calculator is in radian mode, sec() can be used with complex numbers as well.
:sec(60°)
2
:sec(x)
1/cos(x)
:sec(π/2)
undef
If sec() is applied to a list, it will take the secant of every element in the list. However, it can't be applied to matrices the way cos() can (this is probably an oversight; all the trig and hyperbolic functions that were present in all AMS versions work with matrices, but the ones added in version 2.07 do not).
Error Conditions
260  Domain error happens when taking sec() of a complex number in degree or gradian mode.
Related Commands
Converts an angle to gradians, if necessary.
angle ^{G}
Menu Location
 Press 2nd MATH to enter the MATH popup menu.
 Press 2 to enter the Angle submenu.
 Press C to select ^{G}.
This command requires a TI89 Titanium or Voyage 200 calculator with AMS version 3.10 or higher.
1 byte
NOTE: Due to the limitations of the wiki markup language, the ^{G} command on this page does not appear as it would on the calculator. See Wiki Markup Limitations for more information.
The ^{G} symbol used after an angle makes sure the angle is interpreted as being in gradians (an obscure angle measure in which a full circle is equal to 400 gradians); this functionality is present only on TI89 Titanium or Voyage 200 calculators with AMS version 3.10. If the calculator is already in gradian mode, x^{G} is equal to x; in degree mode, x^{G} is equal to 9*x/10; and in radian mode, x^{G} is equal to π*x/200.
If you're using gradian angle measures extensively in a program, it's a better idea to use setMode() to switch to gradian mode and not worry about this. However, there are two reasons you might want to use ^{G}:
 If you need an angle in gradians only once or twice, don't bother changing the mode setting.
 In a function, you're forced to use ^{G}, since setMode() isn't valid in a function.
In gradian mode (no conversion is necessary, so no conversion is done):
:cos(100)
1
:cos(100^G)
1
:100^G
100
In degree mode:
:cos(100)
cos(100)
:cos(100^G)
1
:100^G
90
Related Commands
.