Disaster

name: ''
content: "Sorry about the triple post, but whatever.\nhttps://docs.google.com/file/d/0B3cnHv4I949La2o2Ry1aaThMMXc/edit?usp=sharing"
attachment: null

name: 'Boba Foxx'
content: "YES I CAN POST LINKS THANK GOD\nEventually, will the reply thing not be in an iframe? Some browsers can't scroll thos, and it gets annoying"
attachment: null

name: 'Boba Foxx'
content: "I never noticed that for some reason. \nAnyway, when I click the \"Edit\" button, it takes me to this page:\nhttp://tibasicdev.wikidot.com/post:83/edit/true/noredirect/true\nIt says I'm not the creator of that 'page' since apparently, every single post gets its own page. So apparently, that's how replies get to nest out.\nI kinda miss the old nesting thing of the old layout."
attachment: null

name: ''
content: "I have no idea what your filter is doing… somehow, you managed to make a reply to a reply instead of the thread…\n\nHave you tried using the name form yet, right about the calculator symbols?"
attachment: null

name: ''
content: "Actually, it's not editing it, it's taking me to that comment's talk page… I think. Some error about only admins can edit pages.\nAlso: \n guests cannot upload files, and when the reply box redirects to wdfiles after it uploads, it breaks (that might be my filter not allowing redirects, I'm not sure yet)."
attachment: null

name: ''
content: "Oh, the edit button shows up when I hover over a post. Silly me :3\nEdit: guests cannot upload files, and when the reply box redirects to wdfiles after it uploads, it breaks (that might be my filter not allowing redirects, I'm not sure yet)."
attachment: null

name: ''
content: "Oh, the edit button shows up when I hover over a post. Silly me :3\n"
attachment: null

name: ''
content: 'Awesome, that will be very useful for updating projects!'
attachment: null

name: Zeda
content: "Yes, I like that it is on one line :) As well, what happens if one is signed in, but enters a name in the box?\n\nEDIT: Cool, so it uses a default icon and posts basically as if you aren't logged in."
attachment: null

name: ''
content: "This is a test.\n\nYes, I was able to modify the attachment (:"
attachment: 'file:unstable-cake/unstable-cake.gif'

name: Testing
content: Test
attachment: null

name: ''
content: 'I think there are a few things that would be nice if it were possible to add, but I like it how it is :) I especially like the ability to attach files to posts. I think it will help keep things much more organised. I wonder, is it possible to edit an attachment?'
attachment: null

name: ''
content: "Welcome to TI-Basic Developer, Burr! Have you checked out our TI-BASIC Starter Kit? It has everything you need to get started and if it doesn't have something, you can always ask on the forums!\n :P\n\nActually, it took me quite a while to realise that you were the founder of this site. I think it was three years ago when I realised it, actually."
attachment: null

toolbar-separator.png This article is currently in development. You can help TI-Basic Developer by expanding it.

Besides standard math, trigonometry functions are helpful for simulating rotation and making games like Asteroids.

Key Commands

The trigonometric commands are sin, cos and tan.
sin(θ) returns the sine of θ, which is defined as the y-value of the point of intersection of the unit circle and a line containing the origin that makes an angle θ with the positive x-axis.
cos(θ) returns the cosine of θ, which is defined as the x-value of the point of intersection of the unit circle and a line containing the origin that makes an angle θ with the positive x-axis.
tan(θ) returns the tangent of angle θ, which is defined as $\frac{\sin \theta}{\cos \theta}$
It is slightly unnecessary, as most games that use trigonometry only require sin and cos.

Let's say you are making an object firing simulation and you are keeping track of the angle θ. When you fire, you can increment the location variables X and Y with speed a and angle θ using these formulas:

X+Acos(θ→X
Y+Asin(θ→Y

Examples

The following code illustrates and then calculates the area of a rectangle inscribed in a circle after the user presses [Enter].

Input "RADIUS: ",R
Input "ANGLE: ",θ
AxesOff
ZSquare
Rcos(θ→A
Rsin(θ→B
Circle(0,0,R
Line(0,0,A,B
Line(A,B,A,­B
Line(A,B,­A,B
Line(­A,­B,­A,B
Line(­A,­B,A,­B
Pause 
4abs(AB

The following code awaits the user to input an angle to fire at, using a line to guide, and fires a projectile at that angle until the user presses [Clear]

:AxesOff
:DelVar XDelVar θDegree
:ClrDraw
:94→Xmax
:62→Ymax
:0→Ymin
:Ans→Xmin
:Repeat K=21
:Line(0,0,2cos(θ),2sin(θ
:Repeat Ans
:getKey→K
:End
:Line(0,0,2cos(θ),2sin(θ),0
:max(0,min(90,θ+(Ans=25)-(Ans=34→θ
:End
:Repeat K=45
:X+2cos(θ→X
:Y+2sin(θ→Y
:Pt-On(X,Y
:getKey→K
:End

Of course, Earth has gravity, doesn't it? We can account for that pretty easily. To simplify the problem, we'll just assume that Earth is flat and that the projectile follows a parabolic path:

:AxesOff
:DelVar XDelVar θDegree
:ClrDraw
:94→Xmax
:62→Ymax
:0→Ymin
:Ans→Xmin
:Repeat K=21
:Line(0,0,2cos(θ),2sin(θ
:Repeat Ans
:getKey→K
:End
:Line(0,0,2cos(θ),2sin(θ),0
:max(0,min(90,θ+(Ans=25)-(Ans=34→θ
:End
:2sin(θ→G
:Repeat K=45
:X+2cos(θ→X
:Y+G→Y
:G-.05→G    // :D Now it follows a parabolic path! You can change gravity by changing this number.
:Pt-On(X,Y
:getKey→K
:End
<< Probability Table of Contents Complex Numbers >>

name: ''
content: 'And, it seems as if anonymous users will be able to post with a name!'
attachment: null

name: 'Timothy Foster'
content: 'Yes, I like it a lot better (: It''s less clunky.'
attachment: null

Programming is a very demanding task, and it requires a special kind of person. Most people who try their hand at programming decide that it is either too much work, too boring, or a combination thereof. Fortunately, these people are the ones you don't want to be programming, so it all works out.

Assuming you are not one of those people, there are a few key indicators that tell you whether you are cut out to be a programmer. The first indicator is your mental aptitude. Do you enjoy solving problems and puzzles — for example, a complex math problem — and do you like the more technical things? Programming at its core is about solving problems and figuring things out, so if you don't have the right mental aptitude, then programming probably isn't for you.

Related to the first indicator, the second indicator is your willingness to work through difficult problems and figure things out. This skill requires a very dedicated, almost obsessive person who is transfixed on the problem. Even if you don't know something, you need to be comfortable with that feeling, and still be able to rationally research a solution to the problem.

The third indicator is your passion for learning and growing. Do you spend hours at a time reading and researching in books and documentation? When you see high-quality programs and games, does that make you want to dissect the program to find out how it works? Passion is often what drives you to keep pushing to the next level, and without it, you will almost be guaranteed to just get tired and give up.

All three of these indicators — aptitude, persistence, and passion — are vitally important to any successful programmer. We all face challenges and difficulties, but we overcome them using those different things. If you only have two of the three indicators, you can still be a decent programmer, but you won't be as complete a programmer as you could be.

<< TI-Basic Bugs Table of Contents Table of Contents >>

When you are coding, there are several different pitfalls that you have to be aware of. A pitfall is simply code that is syntactically correct, but does not produce the correct or desired results. This list is not meant to be exhaustive, but rather a general collection of things to look out for.

Arrow Keys

One of the simplest pitfalls that people make is forgetting to use the proper values for the arrow keys. This is especially prevalent with beginners, since they are still learning the ins and outs of the calculator. For example, when the user is making movement, and wants to update the player position on the board, you will see something like this:

:A+(K=25)-(K=34→A  // Y coordinate
:B+(K=24)-(K=26→B  // X coordinate

While this code looks right, it actually has the arrow directions flipped around (25 should be swapped with 34, and vice versa for 24 and 26). This code will not generate any errors by the calculator, since it is syntactically correct, but figuring out the logic problem can be challenging if you don't recognize the mistake.

Boolean Expressions

Another common pitfall that people make is messing up their Boolean expressions. A big part of this is simply people not taking the time to learn and understand how the calculator reads Boolean expressions and deals with operator precedence.

A Boolean expression is based on Boolean Logic, the principle that something can be either true or false. A true value is represented as 1 or any nonzero value, while a false value is represented as 0. In addition to the four math operators (*,/,+,-), there are six conditional operators (=,≠,>,<,≥,≤) and four logic operators (and,or,xor,not).

The operator precedence that the calculator follows is math operators are executed first, then the conditional operators and finally the logic operators. Of course, if there are parentheses, the calculator executes what's inside the parentheses first, which can include any one of the three different kinds of operators. Here is an example to illustrate:

:If B=A and CD:Disp "B=A and C*D≠0
:If 5X=2Y+(Y/X≠5:Output(2,2,"Hello

Memory Leaks

Another pitfall to avoid is causing memory leaks with branching out of loops and conditionals and overusing subprograms. This is especially important because memory leaks not only take up more and more memory, but also slow the calculator down (depending on the size of the memory leak, it can be to a halt).

To prevent memory leaks from occurring, you should always make sure that any loops and conditionals (anything with an End command) are executed to their completion. The reason is that the calculator keeps track of the End commands for loops and conditionals, so if one of them isn't completed, the calculator isn't able to remove it from its list.

While it is possible to correct a memory leak problem in your pre-existing code, the best time to make those changes is when you are actually planning a program. This is because a properly planned program can be made to not only have no memory leaks, but also be as fast and small as possible. Of course, if you don't feel like rewriting your code again, a simple fix will suffice.

:If A=5:Then
:Disp "A=5
:Goto A
:End
should be
:If A=5:Disp "A=5
:If A=5:Goto A

Portability

One of the most common pitfalls that people make is forgetting about program portability. With all of the Assembly libraries available, and there being several different TI-83 based calculators available, it is easy to see how portability becomes an issue.

In addition to the Assembly libraries, there are also several new commands that TI has added to the TI-Basic language for the newer TI-84+/SE calculators. While you can use these commands in your programs, they will crash your programs if somebody tries to execute the program on a TI-83/+/SE calculator.

Unfortunately, the only thing you can do if you want your program to be TI-83/+/SE compatible is to not use these libraries and commands. This means you won't be able to include that functionality in your program, which can be a big selling point of your program.

If you don't care about your program working on the TI-83/+/SE calculators, then portability isn't an issue for you and you don't have to worry about it. However, you should still tell the user at the beginning of the program that the program is designed to work on the TI-84+/SE, and in fact will crash if used on a TI-83/+/SE.

The same goes for using Archive/UnArchive if you care about portability to the TI-83 calculator. Additionally, while programs with lowercase letters will work on the TI-83, they can't be sent from a TI-83+ or higher to a TI-83 via the link cable.

Math Errors

Because of the way the calculator is designed, it has limited precision when doing math. Any math calculations that involve extremely small or large numbers (ranging from -E99 to E99) will produce rounding errors that don't return the right number. There are a couple different ways you can deal with this problem.

The round( command will round a floating-point number so that it has the specified number of decimal digits. While you can hypothetically set it so that it has 25 digits, the calculator only allows a number to have up to 14 digits, which means the range is 0-14 digits.

Another way to deal with the problem is by multiplying the number by a smaller number. The calculator will automatically treat the number in a similar fashion to the smaller number, which allows it to make the math expression work. Truthfully, neither of these methods is fool-proof, so you should just be aware of the problem.

<< Productivity Tips Table of Contents TI-Basic Bugs >>

Productivity is all about using your TI calculator as efficiently and effectively as possible. There are several things you can do to improve your productivity when you are writing TI-Basic programs:

  • Keyboard Shortcuts — In the Program editor, if you press alpha followed by up or down, you will scroll a whole page of program code. In addition, 2nd right will take you to the end of your current line, and 2nd left will take you to the beginning of that line.
  • Backup Often — You never know when your calculator might crash, and you would be extremely upset if you lost all of your new work on your program that you had been working on. If you only have one program, backing up just consists of creating a new program, and recalling the program code into that program. However, if your program uses several programs and other variables, you should group it instead.
  • Archive Programs — When you are not using a program, you should archive it so that it won't get erased accidentally in case of a RAM clear. This also applies to important program data, such as a highscore list. Alternatively, you can also group the program and program data together so you have both in one file. Grouping also saves more RAM than archiving the programs separately.
  • Know The Commands — There are lots of commands on the calculator that people never bother using, mainly because they don't know about them. Before trying to create your own program to do something, check to see if the calculator doesn't already provide a command or function that does it, because the built-in commands are almost always faster and smaller.
  • Edit On The Computer — The TI-Graph Link program that TI provides allows you to edit programs on the computer. In addition to faster scrolling and making program structure easier to visualize, the Graph Link also features the ability to type lowercase text and lock a program so it can't be edited on the calculator.
  • Use CtlgHelpCtlgHelp is an Assembly application that is rather large (it is 32KB), but is a very helpful reference when trying to remember the syntax for using a command. After you have installed it, you just have to go to the Catalog menu and press the + key to see the help for that command. It can also be used in other menus, such as the MATH, LIST, and PRGM menus.1
  • Write Comments — Whenever you write a complicated piece of code, you should put a comment in the code explaining what it does, and if appropriate, how it does it. If you ever need to come back to the code, you will now be able to quickly ascertain everything you need to know about the code. Comments are also useful when you don't have the time to implement something, and you want to remind yourself with a quick "To Do".
  • Reuse Code — In many large programs, there are several pieces of code that get reused multiple times. Rather than writing the code over and over again, you can simply store it in its own program and have the main program call it as a subprogram. Because the subprogram is insignificant by itself, you should start its name with a Z or theta so that it appears at the bottom of the program list.
  • Coding Style — When writing a program, you should follow code conventions so that it is easy to read and understand. Although each programmer has their own preferences in regards to programming code, there are some general guidelines that most people follow, which help to provide continuity across the programming community:
    • Line up corresponding commands and statements vertically.
    • Don't go through silly contortions to use a loop, when Goto/Lbl branching would be more practical.
    • Use mnemonic label names. For example, Lbl UP would be an appropriate choice for code that moves the screen up.
    • Before using custom list variables, you should use up the built-in variables.
    • If you have a really complex expression, you should add some parentheses to make it easier to read.
    • Be consistent throughout all your code. If you do one thing in one program, you should do it the same way in another program.
    • Use subroutines, even if you only use a piece of code once, it is a lot easier to modify an independent program than it is to find that section of code in your whole code. Once you have passed the development stages, use the rcl feature to copy the subroutines into a skeleton.
<< Variable Tips Table of Contents Coding Pitfalls >>

General Tips

Checking for Whole Number

The fastest way to check for a whole number is:

:not(fPart(X

Using DelVar

When using the DelVar command, you don't need to use colons (:) between the DelVars:

:Delvar ADelvar Str1...

This also holds when you are dealing with a completely different command, so

:DelVar AClrHome

is perfectly legal.

Know When to Use Variables

Many times you will have to use a number repeatedly in a program. To save memory you can assign that number to a variable at the beginning of your program and then just call that variable whenever you need it. This also works for strings that are used a lot.

Why Variables Get Messed Up

There are several things that can cause variables to get messed up:

  • The Equation Solver updates any given letter variable that is solved for.
  • Function graphing, and the tracing thereof, causes X and Y to be updated.
  • Parametric graphing, and the tracing thereof, causes X, Y, and T to be updated.
  • Polar graphing, and the tracing thereof, causes X, Y, R, and θ to be updated.
  • Sequence graphing, and the tracing thereof, causes X, Y, and n to be updated.
  • Generally, moving the cursor on the graph screen updates X and Y.
  • All the above update R and θ as well if in PolarGC mode.
  • Tangent, DrawF, and DrawInv update X and Y for each coordinate drawn.
  • All Shade( functions update X and Y for each coordinate drawn.
  • Y is set to zero per each refresh of the graph screen. (The only reason I can think of is that Y is involved in the calculating of the regions.)
  • Generating a list through sequencing does not update letter variables (but will create them if they didn't exist)

Extra Variables

Sometimes when doing a program you might run out of variables to use. If that happens there are many different places you can go to for more variables. Some are:

  • Create lists or matrices and just use/manipulate them
  • Extra N—Open the catalog and press LOG and ENTER
  • Window variables—Hit VARS and then ENTER
  • Statistic variables—Hit VARS, 5, and scroll through the menus of variables
  • Finance variables—Hit APPS and then go into the Finance application

(Note: You can also use most of them as characters.)

List Tips

Use Custom Lists before Built-In Lists

Avoid using lists other than L1, L2,…, L6. You should only use custom lists when you need to save something.

Check if Elements are the Same

The quickest way to check if all the elements of L1 are the same is max(Δlist(L1.

Separate a List

You can use seq(L1(A),A,C,D→L2 to separate a list into two or more lists, where C is the start and D is the stop.

Favor cumSum(binomcdf( over seq(

cumSum(binomcdf(X,0 is the same as seq(I,I,1,X and is smaller and faster. See here for more information.

Angle Values in List

If you use the tangent, sine, or cosine function in programs you might notice they aren’t that fast. A better way to do it is to store the values in a list and then recall them from the list.

Store to one List Element Higher than Exists

You can store to one list element higher than exists. This even applies if the list does not exist, in which case the list would be created and the first element would be where the is stored.

:3→dim(L1
:Input A
:A→L1(4

(Note: This will create a fourth element in list 1, and then store A in the fourth element.)

Create a List without the L in Front

When you store to a custom list, usually you need the little “L” in front. However, this is not true. If you just have a letter or a number that is being stored to, it will actually store the list data to a list with the letter or number’s name.

:{1,2→LA
can be
:{1,2→A

Shuffle a List

The smallest and (almost) fastest way to shuffle a list (for instance, a deck of cards) is:

:seq(X,X,1,52→L1
:rand(52→L2
:SortA(L2,L1

This technique can, of course, be extended to lists of other lengths.

Chop Off First Element of a List

You can chop off the first element of a list by using the ∆List( and cumSum( commands together, since they are essentially exact opposites. In this example, the first element of L1 is chopped off and the list is stored back to L1:

:∆List(cumSum(L1→L1

User-Friendly Lists

I'm sure others like me want to be able to type in a list without the brackets, separating the elements with only commas. Here's how:

:Input Str1
:expr("{"+Str1→L1

Load a User-Named List

This will load any list the user names:

:Repeat 5≥length(Str1
:Input "Name of List:",Str1
:End
:expr("L"+Str1→L1

Matrix Tips

Initializing Matrices

In games where you store maps with all the same values in matrices, you need to initialize the matrices in order to use them. There are three different ways that you can do this.

The first way is to set the dimensions of a matrix and then use the Fill( command:

:{8,8→dim([A]
:Fill(0,[A]

The second way you can initialize the matrix is to actually delete it before using it, and then set its dimensions to the desired row and width. This initialization method only works when you want all the matrix elements to have a value of zero.

:DelVar [A]{8,8→dim([A]

The last way you can initialize the matrix is to use the identity( command. The identity( command is used to create an identity matrix based on the matrix that it's given, which must be a square, n-by-n matrix. Because of the identity( command, this initialization method only works when you have a square matrix and you want all the matrix elements to have a value of zero.

:0identity(8→[A]

String Tips

Skip String►Equ( Command

If you want to put a string into one of the function variables (Y0-Y9) you don’t need to use the String►Equ( command. Instead, you can just simply store the string into the function variable.

:String►Equ(Str1,Y1
can be
:Str1→Y1

Get → and " in a String

Follow these steps to get the or " symbols in a string:

  1. Type them on the home screen and press [ENTER]
  2. Select 2:Quit when the ERR:SYNTAX comes up.
  3. Press [Y=] to go to the equation editor.
  4. Press [2nd] [ENTRY] to recall the symbols to Y1
  5. Now, use Equ►String(Y1,Str1) to store the symbols to a string.

Use the expr( Command

One of the most unknown and unused commands is expr(. What this command does is allow you to store an expression to a string (includes graph equations) and then execute the string. Since you may use graph equations, you have 28 "extra" strings to use for text and data storage. But if you use graph equations to store data in a graphics-based program, remember to turn the functions off with FnOff.

:Input “Formula:”,Str1
:Disp expr(Str1

Converting a String to List

The fastest way to convert a string that contains only alphanumeric characters and spaces to a list is:

:seq(inString("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",sub(Str1,A,1)),A,1,length(Str1→L1

Copy & Paste Function

If you store frequently used code to a string, you can recall the string into a program as a sort of "copy-and-paste" function. However you have to go through menus to get to the string, not to mention delete the quotes. So store your three most frequently used pieces of string into those variables, u, v, and w. Recalling those doesn't make quotes, and it's faster than getting it from a string. See seld-modifying code for more information.

Ans Tips

If you want to speed up your program while doing calculations, you can use the Ans variable. To use Ans, put the calculation in a line all by itself, then it will automatically be stored into Ans saving the need for storing the calculation into a variable. (NOTE: You should only use Ans if it involves changing just one variable.)

:If 8>C
:Output(4,2,"Higher
:If 8<C
:Output(4,2,"Lower
can be
:"Higher
:If 8<C
:"Lower
:Output(4,2,Ans

Whenever you are using the pxl-Test( command and speed is a priority, you should put the command on its own line and test for Ans:

:pxl-Test(0,0
:If Ans
is faster than
:If pxl-Test(0,0

When you are using a For( loop, you can use the following if you want to store something in A without messing up Ans:

:For(A,16,0,-1
:End
<< Tips & Tricks Table of Contents Productivity Tips >>

Eliminate Annoying Things

If you want you to get rid of the “Done” message after you exit your program you can place some text or just a single double-quote on the last line of your program. Another option is to use the Output( command, which has the benefit of not moving the cursor to the second line.

:ClrHome
:Output(4,4,"Some Text
:"

Something to be aware of about this, however, is that because there is no Stop command, Return is implied. This is okay if your program runs independently, but be careful if your program was called by another program- it will return to the previous one instead of quitting.

Another annoying thing is the run indicator that appears in the upper right corner of the screen. You can get rid of the run indicator by using Text(-1,0,90," " or Output(1,16," " (on the home screen) in a getKey loop:

:Repeat Ans
:Text(-1,0,90," // 1 space
:getKey→K
:End

Home Screen Text on Graph Screen

To get home screen font on the graph screen (except on the regular TI-83) you should place '-1' at the beginning of the Text( command:

:Text(-1,Y,X,"Text

Digits in a Number

To find out the number of digits in a whole number (i.e., a number without decimals), use the log( function. An abs( function prevents a domain error when taking the logarithm of a negative number:

:1+int(log(abs(#

Empty Variables

You can create an empty string with "→Str1, and an empty list with the ClrList command.

Displaying Quotes and Store

Without storing them to a special string, you cannot usually display quotation marks (") and the store command (→). However, you can mimic these respectively in the Text( command by using two apostrophes (' '), and two subtract signs and a greater than sign (—>).

Right Triangle Hypotenuse

You can get the hypotenuse of a right triangle by using R►Pr(a,b), where a and b are the legs of a right triangle, or abs(a+bi, where a and b are the legs of a right triangle and i is the imaginary i.

Dividing by 100

Using the program editor, you can place the % symbol directly into the code as a replacement for dividing by 100. This saves a few bytes each time you use it.

Using the sub( command, if only one argument is given and it contains an expression that evaluates to a real, complex, or list of numbers, the argument will be divided by 100.

:sub(225
    2.25

Turn the Screen Black

If your window is set up so that Xscl < ΔX and Yscl < ΔY, you can use GridOn to make the entire screen black. You should note, however, that is rather slow.
You can also use Shade( to go faster.

:Shade(Ymin,Ymax

Inputting Coordinates

Most programmers know the normal syntax for Input, but it can be used alone without any arguments. This simply displays a little "+" on the graph screen, along with the coordinates on the bottom. The plus symbol can be moved horizontally or vertically to a certain coordinate, and the command ends by pressing ENTER. The coordinates are then stored to x and y, respectively.

:Input

Faster Circles

On the TI-83+ and above, the Circle( command has an alternate syntax. When a complex list such as {i} is added as the 4th argument, "fast circle" mode will be turned on, which uses the symmetries of a circle to save on trig calculations, and draws a circle in only 30% of the time it would normally take.

:Circle(0,0,5,{i

Extra Characters

Although the extra characters are only available through an assembly program, once you have them you can store them to a string and then use the string in a program with no problems. The characters include lowercase letters and ASCII characters (such as @, &, #, $, and international characters like ä).

Strange Control Flow

There are a few cases of strange control flow, where you can use If conditionals by themselves, or together with loops and/or DelVar, to create some interesting results. The Disp commands tell the input conditions under which they will be executed.

  • The dangling else (i.e, the executed statement itself is a conditional)
:If A:If B:Disp "B or not(A)
:If A:Then
:Disp "A
:If B:Else
:Disp "not(A) or not(B)
:End
  • Misusing the DelVar bug that occurs when chaining an If, Else, or End command to the end
:If A:DelVar XIf 0
:Disp "not(A)
:If A:Then
:Disp "A
:If B:DelVar XElse
:Disp "A and not(B)
:End

Running Programs from Assembly Shells

As a matter of convenience, you can run your TI-Basic program from an assembly shell. DoorsCS 6 will automatically display all programs, but you need to place a colon (":") as the first line of your program for MirageOS to recognize it. However, it should be noted that there is no guarantee that your program will work correctly when run by a shell.

Moving Setup to Program End

If you have a large program where speed is at a premium, then you want the main program loop as close to the beginning of the program as possible. Since program setup is usually the code that is at the beginning of the program, this means that you should move it to the end of the program and then jump to it using a Goto.

:99→I
:Goto 0
…
:Lbl 0
:ClrDraw
:ZStandard
:ZInteger
:Menu(" FROGGER v1.0 ","PLAY",1,"HELP",2,"EXIT",3

Extra Variables

If you are out of variables (A-Z and theta) to use in a program, there are actually 8 more that can be used in the same way as the others (although they do have functions of their own in certain situations). However, none of them appear in the memory menu. They are:

n

This can be typed using the [X,T,theta,n] button when in sequential mode, or by using the catalog and jumping to n. You can use the DelVar command on this, but you cannot call it if it is not defined like you can other variables.

ℕ, I%, PV, PMT, FV, P/Y, C/Y

These can all be typed using [Apps][Finance…][Vars]. You cannot use the DelVar command on these, however you can call them if they are not defined (they will come up as 0).

This allows for use of up to 35 variables instead of 27.

More Information on the last 7 of these can be found at the bottom of the System Variables page.

<< Downloads Table of Contents Variable Tips >>

Now that you have learned the commands, design theory and game techniques, it's time to put that information to use. These project ideas are for programs that you should try to make to the given specifications, using whatever commands you need. Of course, the specifications aren't set in stone, so you don't have to include something if you don't want to.

In addition to following the specifications, try to make the programs as optimized as possible, and use good design when structuring them (i.e., don't use Goto when a loop is really what you should be using). If you can successfully make all of these programs, and have done a good job writing them, you can consider yourself a good programmer.

If you are having trouble making any of the programs, or you just want some input from other people, you can post in the forum. Before you do that, though, we encourage you to really try to create the programs and put some thought into them.

Phone Directory

Create a phone directory with these features:

  • Make a list of phone numbers, and also include the person(s) who own the phone number.
  • Display the phone numbers and person(s) on the screen.
  • Let the user sort through the phone numbers in ascending and descending order.
  • Let the user create, delete, and update the phone numbers and person(s).

Role-Playing Game (RPG)

Create an RPG with these features:

  • Use the home screen for the interface.
  • Split the map into multiple pieces, displaying each piece when needed.
  • Create a theme for the RPG and base everything off of it.
  • Give the player a few weapons to attack enemies with.
  • Create AI enemies that the player can battle for experience points.
  • Make a couple bosses that the player has to defeat to advance to the next level.
  • Upgrade the player weapons when set experience points are gained.

Snake

Create a snake game with these features:

  • Make a snake character that you can move around on the screen using the arrow keys.
  • Randomly display a piece of food on the screen for the snake to "eat".
  • Use collision detection to check if the food was eaten or the snake went off the screen.
  • If the snake goes over the screen boundaries, the snake is dead and the game is over.
  • Keep a highscore based on the highest amount of food the snake has eaten at one time.

BlackJack

Create a blackjack game with these features:

  • Use a graphical interface.
  • Have custom input for both players, alternating between players.
  • Implement all the rules of blackjack into the game.
  • Record the games won/lost by each player.

Hangman

Create a hangman game with these features:

  • Use a graphical interface.
  • Use custom input for both players.
  • Have one player choose a word, and the other player guess the word.
  • The guessing player gets ten chances to guess the word before they lose.
  • The guessing player selects a letter that they think is in the word. If the letter is there, then that letter is revealed and the player doesn't lose a chance.
  • If the letter is not there, the player loses one of their chances.
  • If the player guesses all the letters in the word, they win. If they run out of chances before they get the word, they lose.

Flight Simulator

Create a flight simulator with these features:

  • Use the graph screen
  • Use way points and navigation
  • Use multiple computing systems to determine attributes such as location, speed, angles, weather, engine condition, distance, fuel etc.
  • Use auto piloting
  • Include output of direction, angle relative to horizon, attributes, and system efficiency
<< What Next? Table of Contents Command Cheat Sheet >>

content: 'I don''t know if you guys noticed, but I changed the TI-Basic characters above the reply box to just one line. Does that look any better?'
attachment: null

content: 'I can''t remember. I probably wanted to observe graphs dynamically like what you can do on various computer programs and the new Nspires.'
attachment: null

formOne: ''
content: "I thought I would create an intro thread as well, just like X/Zeda.\n* I am the founder of TI-Basic Developer.\n* I used to be a member of both United-TI and Cemetech.\n* I don't do any TI-Basic programming anymore, but I do enjoy the community around the site.\n\nThat is all :P"
attachment: null

formOne: ''
content: ''
attachment: null

content: 'That looks nice :) I''m curious, why did you create that?'
attachment: null

content: "I've seriously got to figure out how to make the system handle anonymous users properly.\n\nAre you able to take a screenshot of what you are seeing?\n\nAlso, are you not able to edit your posts? If you can't, then I don't know how to fix it, because theoretically, you ought to be able to…"
attachment: null

content: 'That''s displayed when you hover over the date/time.'
attachment: null

content: 'Would it be possibble to have a "n minutes ago" thing with some of the posts? Sometimes wikidot gets my time zone wrong and it''s confusing.'
attachment: null

content: "Welcome to TI-Basic Developer! Na, just kidding :D\n\nIt sounds like you are digging the new forum… Any things you would change about it?"
attachment: null

content: 'Thanks for that page, Timothy :)'
attachment: null

content: 'It looks nice :)'
attachment: null

content: "I do like the \"Goto this post\" thing, too.\nAlso, would it be possible to edit a post that's attributed to your IP?"
attachment: null

content: "This page is weird for me. CSS seems to br broken for me, according to firebug it's trying to load from the wikidot domain.\nAlso, this reply thingy is weird."
attachment: null

content: "I found this little guy sitting in my pile of things I did a long time ago:\n\n[[code]]\nClrDraw\nFnOn\nFull\nAxesOn\nDispGraph\n2→F\nRepeat Ans=45\nIf sum(Ans={92,93,94,82,83,84,72,73,74\nThen\nAns-36-5int(.1Ans\nexpr(sub(\"789 456 123\",Ans,1→F\nDelVar A\nEnd\nIf Ans=32 or Ans=33\n1+(Ans=33→A\nIf Ans=24 or Ans=26\nThen\n1-2(Ans=26\nAns(Xmax-Xmin)/(10F-1→T\nXmin-Ans→Xmin\nXmax-T→Xmax\nDelVar A\nEnd\nIf Ans=25 or Ans=34\nThen\n1-2(Ans=34\nAns(Ymax-Ymin)/(10F-1→T\nYmin+Ans→Ymin\nYmax+T→Ymax\nDelVar A\nEnd\nIf Ans=85\nThen\nXmin(F-(F-1)(A=2→Xmin\nXmax(F-(F-1)(A=2→Xmax\nYmin(F-(F-1)(A=1→Ymin\nYmax(F-(F-1)(A=1→Ymax\nDelVar A\nEnd\nIf Ans=95\nThen\nXmin/(F-(F-1)(A=2→Xmin\nXmax/(F-(F-1)(A=2→Xmax\nYmin/(F-(F-1)(A=1→Ymin\nYmax/(F-(F-1)(A=1→Ymax\nDelVar A\nEnd\nIf Ans=12\nThen\nZStandard\nDelVar A\nEnd\nDispGraph\ngetKey\nEnd\n[[/code]]\n\nSupposedly, this allows you to dynamically manipulate the graphscreen without having to input the window boundaries every time. Using the buttons below causes it to perform the respective actions.\n\nArrow Keys — Determines the direction by which the screen moves relative to the origin.\n+ — Zoom in. The axes scales become smaller.\n- — Zoom out. The axes scales become larger.\nNumber Pad — Determines the scale factor. 9 makes very large changes; 1 makes very little changes.\nX,T,θ,n — This button plus a zoom button will exclusively zoom the x-axis.\nSTAT — This button plus a zoom button will exclusively zoom the y-axis.\nWINDOW — Resets the graph screen to a window of X(-10,10) Y(-10,10).\nCLEAR — Halts program."
attachment: null

content: "One of my project ideas is something called the Chess Sandbox. Essentially, it will be a chess program which has absolutely no validation checks; everything will be based on the honor system. By doing this and making a wider variety of piece models available, users will be able to make up their own variations of chess and play them online.\n\nCurrently, my plan is to write this in Actionscript 3.0, but I have been contemplating the use of Java. One of my fears is that I won't be able to figure out online capability and whatnot. Creating live connections seems like it could be difficult; then again, it must be possible, considering Minecraft was written in Java and handles multiplayer fairly decently."
attachment: null

content: '(Just a test.)'
attachment: null

content: ''
attachment: 'file:20121204164418-0/20121204164418-0.jpg'

content: 'Actually, the rules page just says that the rules aren''t yet available. However, I read the rules on the post here.'
attachment: null

content: 'Read the third post on this page.'
attachment: null

content: 'What happened to the different tools above the text box?'
attachment: null

content: 'This is just a test. '
attachment: null

content: "I have finished the New Forum System enough for testing. Please see how you like it!\n\nA few things you will notice:\n* You cannot preview a post. This is due to the Wikidot coding I'm using. However, sacrificing this functionality means being able to make attachments and having the integrated char box.\n* The syntax buttons do not show anymore. All of the relevant styling can be found here.\n* Everyone has the member type \"Member Type\". I still haven't quite figured out how I want to code this; it isn't easy.\n* I'm still figuring out how this is going to affect unregistered users (sorry Boba Foxx…), but I have ideas on making it work.\n\nPlease provide feedback so the system can better fit the needs of the community."
attachment: null

content: "Woah! I wanna do it! \nI tried to sign up, but it has a box that says \"I read and agree the contest rules, and the calendar in case I want to judge.\" —where can I find the contest rules?"
attachment: null

Recent Posts

The ListPages module does not work recursively.

Recent Threads

The ListPages module does not work recursively.

content: 'Yes, I made one.'
attachment: null

Feb 02 Timothy Foster revised the forum system. Check it out!

content: "Here are some pointers on how you can embellish your posts.\n\n||~ Style||~ Code||\n||Bold|| **Bold**||\n||Italic||//Italic//||\n||Underline||__Underline__||\n||Monospace||{{Monospace}}||\n||Superscript||Super^^script^^||\n||Subscript||Sub,,script,,||\n||Internal Link||[[[home|Internal Link]]]||\n||External Link||[http://tistory.wikidot.com/ External Link]||\n\nYou can make code by encasing it in [[code]]...[[/code]] blocks:\n[[div class=\"code\"]]\n[[code]]\nYour code here!\n[can make a quote with the following syntax:\n[[code]\n> This is a quote\n[[/code]]\n\nYou can post math equations by encasing a LaTeX expression in [[math]]...[[/math]] tags.\n\n[[code]]\n[[math]]\nx = {-b \pm \sqrt{b^2-4ac} \over 2a}\n[= {-b \pm \sqrt{b^2-4ac} \over 2a}\n[[/math]"
attachment: null

content: "Whether you are a new visitor or a frequent lurker, we are excited that you are on the site! We are a community, made up of a diverse collection of people with different backgrounds and experiences, and we want you to become one of us. It doesn't matter whether you are just starting out in programming or you are already an accomplished programmer, everybody has something that they can contribute.\n\nBefore you can participate on the site, you need to sign up to become a member. Registration is a simple two-step process, and involves creating a Wikidot account and then entering the password 'ti-basic-rulez' on the join page to join the site. It is quick and painless, and should take no more than a couple minutes.\n\nThere are a few things that you need to know before you go off exploring:\n\n* Once you are a site member, please start a new thread and introduce yourself to the community so that we can get to know you better. We're always happy to meet new people on the forum, and I promise we won't bite (unless you want us to) :D\n* Although we are generally very lax in what we allow on the forum, there are some basic rules that we have established to ensure that the forum is an enjoyable place to be. Please read through and familiarize yourself with the rules.\n* The expandable CHAR box that appears in the upper right corner of the screen contains the TI-Basic characters that aren't readily accessed from the keyboard. It is meant to be a nice convenience for people who want to post code on the forum, allowing you to quickly copy and paste instead of having to hunt them down every time.\n* Please do your best to post your threads in the appropriate place. Similarly, start a new thread for your questions, instead of adding them to an existing thread. This helps to keep the forum organized and allows people to read threads without confusion. Of course, we are happy to help you if you don't quite get it right.\n* Except for personal help from a moderator or administrator, please don't ask people to email or message answers to you. The forum is open for reading as well as responding, so all discussion should go in the threads for others to see.\n\nWe hope you enjoy using the site and stop by often!"
attachment: null

content: 'For the curious, I have entered in TI-BASIC (68K and z80) and z80 Assembly. I doubt I will have time for it all, but I do like to participate and join the fun! I will have school to contend with, finishing up my last requirements for my math major among other things and trying to pass French IV :P'
attachment: null

content: "I don't know if any of you have heard of it, but TI-Concours 2013 recently opened up. Ti-Concours is an annual competition and is typically a French competition (Concours = Competition). Last year they bridged a language barrier and opened it up to the English speaking community as well. It was a success and so they have once again opened it up to everybody. This year's categories are:\n* TI-BASIC z80\n* TI-BASIC 68k\n* Axe\n* z80 Assembly\n* Nspire Lua\nThe competition has some interesting components in the final rounds including an interview in English or French, depending on your language and a three hour test to see what you can come up with in a short period of time. The rest of the competition is split up over a period of about six weeks where TI-BASIC (68k and z80) and Axe have two challenges that last one week and the other two categories have one challenge over two weeks. There is some overlap, but the schedule looks like this:\ndates.png\n\nThere is nothing to lose and the prizes are pretty nice! Last year they got surprised with being able to dole out even more prizes (I think up to fifth place in some categories). If you want to sign up before the competition starts, you can register here.\n\nI hope at least some of you can join! There are currently only 4 entrants for TI-BASIC (z80) and two for 68K BASIC!"
attachment: null

content: "Find the next number in the following sequence. To date, no one has been able to find it.\n\n[[div style=\"font-size: 120%;\"]]\n* 9, 0, 2, 6, 94, 10, 42, ?\n[[/div]]"
attachment: null

content: "I have started working on an application that will hopefully evolve to provide on-calc tutorials. Currently it has an example to show the user how to create a simple Hello World program. Here is a screenshot:\nindex.php?action=dlattach;topic=15662.0;attach=14627;image\nThe \"tutorials\" are basically a sequence of keypresses that get simulated. As well, I have added in some commands to interact with the user so you can actually step the user through the process and give them notifications about what is going on. Once I add in a menu, I will release the app and source so that others can create tutorials and submit them for the official release.\n\nMy goal is to cover all of the commands and I will probably need a separate version to work with mathprint. As well as all of the commands, there will be tutorials for different aspects of programming and it will be possible to have tutorials outside the app (probably as appvars). The current command available for making a tutorial are:\n[[code]]\n/=====================\\\n| Key(val) | 1 byte\n\=====================/\n This is the main command. This tells the engine which key to\nsimulate. For example, to simulate [ENTER], use Key(skEnter).\n/=====================\\\n| Delay(val) | 2 bytes\n\=====================/\n This sets the delay between simulated key presses. I find 30\nto work well.\n/=====================\\\n| Text(y,x,string) | 4 bytes + length of string\n\=====================/\n This is how you communicate to the user. This is like the\nBASIC command, except it draws over whatever is on the LCD, not\njust the graph screen. For the worried, this does not affect the\ncontents of the graph screen. So for example:\n Text(56,0,\"Hello World!\")\n/=====================\\\n| WaitForKey(key) | 2 bytes\n\=====================/\n This waits for the user to press the appropriate key. When the\nuser presses the key, it will be registered. No other keys\nrespond while waiting.\n/=====================\\\n| Repeat(key,num) | 3 bytes\n\=====================/\n This will simulate a key press a number of times in a row.\nThis is useful for navigating menus to get to an item.\n/=====================\\\n| ExitTutor() | 1 byte\n\=====================/\n This ends the tutorial and normal OS stuff resumes.\n\n These commands should be enough for most tasks. However, if\nthere are more commands for the adventurous:\n/=====================\\\n| SetAns(num) |\n\=====================/\n This will set the \"Ans\" variable to the specified value. Note\nthat this whole program works with 1-byte values, 0 to 255.\n/=====================\\\n| TestAnsEqu(num) |\n\=====================/\n If 'Ans' is equal to 'num', then 'Ans' is set to 1, else it\nis set to 0.\n/=====================\\\n| GetKey(num) |\n\=====================/\n Stores the user's keypress to Ans. This isn't as responsive\nas it could be, yet, but it works.\n/=============================\\\n| JumpIfAnsEqu(num,label) | 4 bytes\n\=============================/\n This will jump to a label if Ans=num. Note that the label must\nbe on the same flash page.\n/=====================\\\n| PushAns() |\n\=====================/\n This pushes Ans onto a stack for later retrieval with\nPopAns(). The stack is currently 240 bytes, but it may be\nsmaller in the future.\n/=====================\\\n| PopAns() |\n\=====================/\n This removes the last value on the stack and stores it to\n'Ans'.\n[[/code]]\nHopefully I will make a lot of progress on this project, but I also have several other big projects that I am working on. I think that once menus are finished, the rest will be easy."
attachment: null

content: "Sometimes, optimization requires more than just squeezing out bytes. Entire sections of code can often be revised into more compact, efficient algorithms.\n\nDiscover what this program does and rewrite it for either speed or size.\n\n[[code]]\nClrHome\n\"?→Str1\nDisp \"AX²+BX+C=0\nPrompt A,B,C\nIf A<0\nThen\n‾A→A\n‾B→B\n‾C→C\nEnd\ngcd(A,abs(B\ngcd(Ans,abs(C→V\nA/Ans→A\nB/V→B\nC/V→C\nFor(D,A,1,‾1\nIf not(fPart(A/D\nThen\nFor(E,abs(C),1,‾1\nIf not(fPart(C/E\nThen\nA/D→F\nabs(C/E→G\nIf DAns+FE=B and EG=C\n\"1D1E1F1G→Str1\nIf DG-FE=B and ‾EG=C\n\"1D‾E1F1G→Str1\nIf FE‾DG=B and ‾EG=C\n\"1D1E1F‾G→Str1\nIf ‾DG-FE=B and EG=C\n\"1D‾E1F‾G→Str1\nIf DE+FG=B and EG=C\n\"1D1G1F1E→Str1\nIf DE-FG=B and ‾EG=C\n\"1D‾G1F1E→Str1\nIf FG-DE=B and ‾EG=C\n\"1D1G1F‾E→Str1\nIf ‾DE-FG=B and EG=C\n\"1D‾G1F‾E→Str1\nIf Str1≠\"?\nThen\nClrHome\nDisp \"(AX+B)(CX+D)=0\nFor(H,1,7,2\nDisp expr(sub(Str1,H,2\nEnd\nDisp \"FACTOR OUT\nOutput(7,2,V\nReturn\nEnd\nEnd\nEnd\nEnd\nEnd\nClrHome\nDisp \"PRIME\nDisp \"FACTOR OUT\nOutput(3,2,V\n[[/code]]"
attachment: null

content: "Very few people have the guts to fight giant ants.\n\nGood luck."
attachment: null

content: .
attachment: null

content: 'Thread for piloting everywhere.'
attachment: null

content: Pilot.
attachment: null

content: "Right I'm getting to it.\n\n\"Categorize\" is a button that allows you to add descriptive tags, such as axe, movement, arcade, etc. It's just a way of adding more description to a thread."
attachment: null

content: 'Yes, there is; I just hadn''t implemented it last night when I made this post because I was too tired XD'
attachment: null

content: 'This is needed to initialize the system.'
attachment: null

content: 'Another thread of piloting.'
attachment: null

content: 'Pilot Thread.'
attachment: null

content: 'Hmm, is there a way to sticky topics? Otherwise this might get pushed to the bottom.'
attachment: null

content: 'Yet another pilot thread.'
attachment: null

content: 'This is (you guess it) a pilot thread.'
attachment: null

content: 'Okay, thanks! I can work with that. Should we then have a topic to go over all of the special things?'
attachment: null

content: "Hi, I am Zeda, also known as Xeda. I am a moderator here on TI-Basic Developer and I am sure many of y'all are familiar with me. With the new site change, I figured I would help populate the Introductions forum, though. So, about me:\n\n* I have been programming the TI-83+/84+ series for around six years, now.\n* I have a TI-84+, TI-84+SE, and a TI-89t.\n* I program in TI-BASIC and Z80 Assembly and I often help out by supplying assembly hexcodes for things that cannot be easily done in BASIC.\n* I am a moderator here and on several other sites.\n* I am in college, majoring in mathematics. I have also tutored highschoolers.\n* I am almost 21 and I am married :)\n* I was a museum tour guide for a few years. Basically, I just like teaching and helping people out.\n\nFeel free to ask me stuff! I've worked quite a bit with TI-BASIC and z80 assembly, so even if I am not the most knowledgeable, I might know something!"
attachment: null

content: 'This is a pilot thread.'
attachment: null

content: 'This is a pilot thread.'
attachment: null

content: 'This is a pilot thread.'
attachment: null

content: 'This is a pilot thread.'
attachment: null

content: 'This system is using what are called Wikidot Data Forms; that was how I was able to integrate the Char box and place an attachment option. A couple of the downsides to using data forms, though, is that you cannot preview content, and that toolbar of buttons does not appear. Essentially, it is a tradeoff between the preview/text-style buttons and the char/attachment boxes.'
attachment: null

content: "I cannot find an easy way to add to General Discussion, Programming & Design, Projects & Contests. Is this something planned? Also, I notice the \"categorize\" thing. What does that do?\n"
attachment: null

content: "Awesome, it looks great! Are we going to have the buttons for things like urls, images, [[code]] and [[math]] things? And is there some way to preview your post? It looks very nice at the moment.\n\nEDIT: Editing works :D"
attachment: null

content: 'The new forum is now up! Test it to see how it is.'
attachment: null

[[table class="threadTable"]]

content: 'I think so.'
attachment: null

content: "I am liking this style :) And the attachment worked o.o\n∏(1-1/p)-s\nHave you managed to figure out a way to preview posts?"
attachment: null

content: 'This looks nice.'
attachment: null

content: 'The purpose of this section is to make posts about individual wiki pages.'
attachment: null

content: 'How is the new forum? What changes ought to made?'
attachment: null

content: "When people visit and contribute to the forum, we want to make sure that they find it useful and an enjoyable place to be. To ensure that this happens, there are a few rules that you need to follow. Please read through and understand these rules, so that you know what we expect from you. Thank you.\n\n* Always try to be respectful of other posters, including their opinions, values, point-of-view, etc.\n* Always try to work with other posters instead of against them; this is a community and we are all here to help.\n* Don't post or request anything illegal or illicit, including ROMs, music, movies, p0rn, etc.\n* No cursing, spamming, or flaming! There is almost always a better way to express yourself.\n* Don't advertise your programs or websites, unless they are relevant and have some unique value to them.\n* Don't reply to old threads (last post is more than three months old) unless you have something new and valuable to contribute; start a new thread instead.\n* If a topic starts getting off-topic, start a new topic. Likewise, a topic should be placed in the appropriate category.\n* Don't try to pass off someone else's work as your own — give credit to the author whenever possible.\n\nWe reserve the right to remove, edit, move or close any post or thread when we deem it necessary.\n\n"
attachment: null

content: "Whether you are a new visitor or a frequent lurker, we are excited that you are on the site! We encourage you to take the next step and to sign up to become a member. Registration is quick and painless, and allows you to take advantage of all the features that the site offers.\n\nOnce you are a member, please start a new thread and introduce yourself to the community so that we can get to know you better. Tell us a little bit about yourself:\n\n* Where are you from?\n* What do you do? Any hobbies?\n* How long have you been programming? What languages?\n* What projects are you working on?\n\nIn addition, we ask that you state what you have to offer to the community and similarly what you want to achieve in this community. Please be honest in answering these questions, so that we can make your experience here better.\n\nWe hope you enjoy using the site and stop by often!"
attachment: null

The ListPages module does not work recursively.
Category Threads Last Thread

content: "You are very silly.\n\nEDIT: Test edit."
attachment: null

content: "Nunc iaculis urna elementum quam. Suspendisse tristique eros quis massa. Sed iaculis, ligula at posuere tempor, lectus libero fringilla eros, a vehicula felis magna non pede. Donec ac lacus. Donec risus erat, rutrum sed, ornare at, suscipit a, nibh. Nullam posuere laoreet purus. Duis aliquet sollicitudin felis. Pellentesque ipsum. Praesent vel libero. Phasellus suscipit aliquet tortor. Fusce ornare blandit risus. Vivamus venenatis blandit pede. Nullam massa. Ut placerat fringilla neque. Nam tortor magna, imperdiet ut, volutpat in, lobortis vitae, sem. Donec in nisi ac leo fermentum eleifend.\n\n[[code]]\nPrompt A,B,C,D\n3-1(3C/A-B2/A2→P\n27-1(2B3/A3-9BC/A2+27D/A→Q\nP3/27+Q2/4→E\nIf E≥0\nThen\n3√(-Q/2+√(E→U\n3√(-Q/2-√(E→V\nU+V→I\n-(U+V)/2+i(U-V)√(3)/2→J\n-(U+V)/2-i(U-V)√(3)/2→K\nElse\ncos-1(-Q/(2√(abs(P)3/27→R\n2√(abs(P)/3)cos(R/3→I\n-2√(abs(P)/3)cos(3-1(R+π→J\n-2√(abs(P)/3)cos(3-1(R-π→K\nEnd\nB/(3A\nFix 3\nDisp I-Ans,J-Ans,K-Ans\nFloat\n[[/code]]\n\nLorem ipsum dolor sit amet, consectetuer adipiscing elit.\n\nEditing the original thread."
attachment: null

[[table class="threadTable"]]
[[row]][[cell class="header threadTitle"]]Thread[[/cell]]
[[cell class="header threadCreated"]]Started[[/cell]]
[[cell class="header threadPosts"]]Posts[[/cell]]
[[cell class="header threadRecent"]]Recent Post[[/cell]]
[[/row]]

content: '??????????????????????????'
attachment: null

content: 'Supposedly, this will take me to the post I just made.'
attachment: null

content: 'One more post.'
attachment: null

content: 'I am giving this post an attachment. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus arcu libero, aliquet sit amet, ornare quis, vulputate a, nibh. Aliquam sit amet lectus vitae ligula feugiat condimentum. Proin eu mauris. Suspendisse ac sem. Cras in quam in augue fringilla porttitor. Nulla facilisi. Aliquam erat volutpat.'
attachment: 'file:dragon-encode/dragon_encode.png'

content: 'I made an edit.'
attachment: null

content: 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus arcu libero, aliquet sit amet, ornare quis, vulputate a, nibh. Aliquam sit amet lectus vitae ligula feugiat condimentum. Proin eu mauris. Suspendisse ac sem. Cras in quam in augue fringilla porttitor. Nulla facilisi. Aliquam erat volutpat.'
attachment: null

content: 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus arcu libero, aliquet sit amet, ornare quis, vulputate a, nibh. Aliquam sit amet lectus vitae ligula feugiat condimentum. Proin eu mauris. Suspendisse ac sem. Cras in quam in augue fringilla porttitor. Nulla facilisi. Aliquam erat volutpat.'
attachment: null

content: 'Does this work?'
attachment: null

#header,
#side-bar,
#top-bar,
#footer,
#license-area,
#page-title,
#navi-bar,
#navi-bar-shadow,
#breadcrumbs,
.page-tags,
#page-info,
.page-watch-options,
.page-options-bottom,
#footer-bar,
#login-status,
.search-top-box,
.note-block,
#edit-cancel-button{
    display: none !important;
}
 
#action-area h1, #edit-page-form tbody tr:first-child{
    display: none !important;
}
 
#main-content, #container-wrap, #container{
    margin: 0;
}
 
table.form-table,
div.field-content,
textarea.field-content{    width: 100%; }
td.form-labels{    width: 50px; }
 
tr.form-row p{    margin: 0; }
div.field-charOne,
div.field-charTwo{
    margin-left: 92px; //30px;
    font-family: 'Andale Mono', 'Courier New', Courier, monospace;
    font-size: 9pt;
    color: #11119C;
}
 
div.field-content textarea{
    border-radius: 4px;
    opacity: .4;
    transition: opacity 500ms;
    -moz-transition: opacity 500ms;
    -webkit-transition: opacity 500ms;
    -o-transition: opacity: 500ms;
}
div.field-content textarea:focus{
    opacity: 1;
}
span.field-attachment input,
span.field-name input{
    opacity: .4;
    transition: opacity 500ms;
    -moz-transition: opacity 500ms;
    -webkit-transition: opacity 500ms;
    -o-transition: opacity: 500ms;
}
span.field-attachment input:focus,
span.field-name input:focus{    opacity: 1; }
 
#edit-save-button{
    border-radius: 4px;
    box-shadow: 0 0 2px -2px rgba(0,0,0,.3);
    margin-left: 58px;
}
.page-tags{    visibility: hidden; }
 
.werecode{
    font-family: 'Andale Mono', 'Courier New', Courier, monospace;
    font-size: 9pt;
    color: #11119C;
}
div.werecode{    padding-left: 1em; }

content: "Some code.\n\n[[div class=\"werecode\"]]\n:{0,1→L₁\n:{0,N→L₂\n:LinReg(ax+b) Y₁\n:Equ►String(Y₁,Str1\n:sub(Str1,1,length(Str1)-3→Str1\n[[/div]]"
attachment: null

content: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus arcu libero, aliquet sit amet, ornare quis, vulputate a, nibh. Aliquam sit amet lectus vitae ligula feugiat condimentum. Proin eu mauris. Suspendisse ac sem. Cras in quam in augue fringilla porttitor. Nulla facilisi. Aliquam erat volutpat. Morbi consectetuer, libero at iaculis fermentum, dolor velit tincidunt sapien, lacinia ultricies ligula dui eget orci. Maecenas magna quam, volutpat ut, auctor et, malesuada quis, quam. Fusce semper pharetra mi. Aliquam facilisis tortor ut ante. Nam dignissim, ipsum et pharetra pretium, est sem feugiat sapien, a mattis elit sem vitae neque. Ut nec nibh. Ut sagittis magna nec velit. Maecenas ut eros. Duis lectus. Sed venenatis. Fusce iaculis urna euismod neque.\n\nLorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus arcu libero, aliquet sit amet, ornare quis, vulputate a, nibh. Aliquam sit amet lectus vitae ligula feugiat condimentum. Proin eu mauris. Suspendisse ac sem. Cras in quam in augue fringilla porttitor. Nulla facilisi. Aliquam erat volutpat. Morbi consectetuer, libero at iaculis fermentum, dolor velit tincidunt sapien, lacinia ultricies ligula dui eget orci. Maecenas magna quam, volutpat ut, auctor et, malesuada quis, quam. Fusce semper pharetra mi. Aliquam facilisis tortor ut ante. Nam dignissim, ipsum et pharetra pretium, est sem feugiat sapien, a mattis elit sem vitae neque. Ut nec nibh. Ut sagittis magna nec velit. Maecenas ut eros. Duis lectus. Sed venenatis. Fusce iaculis urna euismod neque."
attachment: null

This is a test category

Welcome to the TI-83/84/+/SE section of TI-Basic Developer (TI|BD), the TI-Basic information repository! If you are a first-time 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!
New to TI-Basic?

These pages provide an overview of TI-Basic, and are designed to help you quickly get started learning and using TI-Basic.

Did You Know...
The ListPages module does not work recursively.
Development
The ListPages module does not work recursively.
Recent News Recent Posts Recent Edits
The ListPages module does not work recursively.
The ListPages module does not work recursively.
I'm referring to the current settings on the calculator. That's all that you can change on the...
(by Battlesquid 20 Nov 2017 01:28, posts: 8)
By content, what do you mean. I know that you can change the settings, but how do you change what...
(by LAX18 19 Nov 2017 20:39, posts: 8)
Content, Yes. Color, no. Here is startup for the 83/84+. Did some research for CE's, you might...
(by Battlesquid 19 Nov 2017 19:16, posts: 8)
The ListPages module does not work recursively.
Search the Site

There is a wide range of TI-Basic content available on this site, so we recommend using the search engine or referring to the sitemap. If you can't find what you're looking for, leave a post in the forums and somebody will assist you.

counter free hit unique web

author: Viktor
description: 'Another pong game, doesn''t loop, fast gameplay and gets harder over time. Has an interesting highscore feature. Multiplayer on two calculators coming soon!'
arcade: '1'
graphics: '0'
platform: '1'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: '/archives:a-viktor-s-pong-2-5/pong2.5titlescreen.gif'
download: Viktor%27s%20Pong%20v2.5.1.zip
size: '1665'
unit: '1'

uidiuidi since 14 Nov 2017 09:21
kevvkevv since 14 Nov 2017 04:12
SanrasSanras since 13 Nov 2017 23:19
93Nick9393Nick93 since 12 Nov 2017 16:50
MistaLODMistaLOD since 08 Nov 2017 18:01
Isaac1943Isaac1943 since 07 Nov 2017 21:56
speedmanspeedman since 05 Nov 2017 23:30
irr3s0luteirr3s0lute since 05 Nov 2017 22:18
Lilli FrasierLilli Frasier since 03 Nov 2017 18:34
GabrielRavierGabrielRavier since 03 Nov 2017 11:07
BrianFinchBrianFinch since 03 Nov 2017 02:40
yo dog84yo dog84 since 02 Nov 2017 23:56
CloudExileCloudExile since 02 Nov 2017 02:31
CharlestonChewCharlestonChew since 02 Nov 2017 02:30
bennymojobennymojo since 29 Oct 2017 16:23
mason1361015mason1361015 since 27 Oct 2017 17:11
Rey de TodasRey de Todas since 27 Oct 2017 15:31
mummiedansermummiedanser since 26 Oct 2017 16:15
BraveHQBraveHQ since 26 Oct 2017 08:39
Bio_Hazard1282Bio_Hazard1282 since 22 Oct 2017 10:44
iPhoenixOnTIBDiPhoenixOnTIBD since 22 Oct 2017 01:55
CARTER2607CARTER2607 since 21 Oct 2017 15:40
Step7Step7 since 21 Oct 2017 03:39
cerezaicerezai since 20 Oct 2017 20:45
ChargePositiveChargePositive since 19 Oct 2017 17:06
ThantZinThantZin since 19 Oct 2017 03:44
ShakinahShakinah since 18 Oct 2017 22:23
Strider1005Strider1005 since 18 Oct 2017 12:40
rubenvdrubenvd since 15 Oct 2017 17:45
Muffin1634Muffin1634 since 14 Oct 2017 06:17
ardenmorsoliasardenmorsolias since 13 Oct 2017 12:00
braubrubraubru since 12 Oct 2017 00:26
Parker1023Parker1023 since 11 Oct 2017 23:47
RyanFin678214RyanFin678214 since 11 Oct 2017 18:30
ABationsABations since 10 Oct 2017 21:32
Gimmi306Gimmi306 since 10 Oct 2017 17:36
Niklaus_13Niklaus_13 since 10 Oct 2017 08:04
teckuser1teckuser1 since 10 Oct 2017 00:27
Cid Ney MaximoCid Ney Maximo since 09 Oct 2017 13:49
Zack_Attack0411Zack_Attack0411 since 06 Oct 2017 02:03
LoganDarkLoganDark since 05 Oct 2017 00:12
LAX18LAX18 since 04 Oct 2017 17:28
Mark WelchMark Welch since 03 Oct 2017 00:21
Mark StineMark Stine since 02 Oct 2017 22:29
WesfordWesford since 02 Oct 2017 03:38
wades39wades39 since 02 Oct 2017 02:01
G3lrodG3lrod since 30 Sep 2017 11:52
LildawgLildawg since 29 Sep 2017 16:20
Anonymous2514Anonymous2514 since 28 Sep 2017 13:27
chem_problemchem_problem since 28 Sep 2017 01:56
Devin FrandsenDevin Frandsen since 28 Sep 2017 01:25
Prof LongfellowProf Longfellow since 27 Sep 2017 18:05
goose121goose121 since 26 Sep 2017 23:25
ComputerNerdInsideComputerNerdInside since 26 Sep 2017 19:01
pythonprogrammr2pythonprogrammr2 since 24 Sep 2017 19:02
Nate PopeNate Pope since 21 Sep 2017 18:27
DruskethDrusketh since 21 Sep 2017 16:48
noahcavanaughnoahcavanaugh since 19 Sep 2017 21:20
MachineKeenMachineKeen since 18 Sep 2017 19:28
erikieriki since 18 Sep 2017 15:25
Helmut_pdorfHelmut_pdorf since 17 Sep 2017 11:32
GamingGuyTylerGamingGuyTyler since 16 Sep 2017 20:13
eeffeemorganeeffeemorgan since 16 Sep 2017 15:43
seNor JoshitoseNor Joshito since 14 Sep 2017 16:43
Jibbly123Jibbly123 since 11 Sep 2017 21:12
Christopher BoomChristopher Boom since 11 Sep 2017 06:58
ACeDudeACeDude since 10 Sep 2017 06:51
JohnE95JohnE95 since 09 Sep 2017 01:26
Glenn CanfieldGlenn Canfield since 07 Sep 2017 23:43
JackMacWindowsJackMacWindows since 07 Sep 2017 00:41
nisma41beenisma41bee since 06 Sep 2017 12:45
Jason TanJason Tan since 03 Sep 2017 18:29
joebillymemes12345joebillymemes12345 since 02 Sep 2017 22:21
65swansonr65swansonr since 02 Sep 2017 17:54
Vondoe79Vondoe79 since 01 Sep 2017 23:54
LordLarryLordLarry since 31 Aug 2017 11:07
bryanhopebryanhope since 30 Aug 2017 21:29
henry udoyehenry udoye since 28 Aug 2017 17:57
Dr SarrozeDr Sarroze since 24 Aug 2017 17:40
legosp7legosp7 since 24 Aug 2017 03:24
themrfishythemrfishy since 21 Aug 2017 21:42
Morgan ErnstMorgan Ernst since 18 Aug 2017 01:31
Bella WilliamsBella Williams since 17 Aug 2017 06:39
Christopher WaddellChristopher Waddell since 16 Aug 2017 02:51
TheLastMillennialTheLastMillennial since 11 Aug 2017 03:34
OrangeShirtOrangeShirt since 08 Aug 2017 00:00
t24livt24liv since 07 Aug 2017 13:48
NodethekdNodethekd since 04 Aug 2017 19:34
drod547drod547 since 01 Aug 2017 02:11
a_bretherinoa_bretherino since 31 Jul 2017 16:11
llacb47llacb47 since 28 Jul 2017 22:33
cutiep1nkcutiep1nk since 27 Jul 2017 15:26
jamljaml since 26 Jul 2017 19:46
Ladyslayer0160Ladyslayer0160 since 17 Jul 2017 18:07
AppMaster1000AppMaster1000 since 16 Jul 2017 22:58
photonsphotons since 13 Jul 2017 00:02
aylwinlamaylwinlam since 09 Jul 2017 05:03
TollikaTheOneTollikaTheOne since 08 Jul 2017 06:08
it_is_Iit_is_I since 07 Jul 2017 20:56
j-rayj-ray since 07 Jul 2017 19:47
page 1 of 12123...1112next »

New Members

The ListPages module does not work recursively.

Member Count

The ListPages module does not work recursively.

Last 3 Members

The ListPages module does not work recursively.

Currently Active Users:

The ListPages module does not work recursively.

Jan 16 There are discussions about redesigning the forums to be more robust.

"This page is still in development. It should be finished within a few months. I appreciate your patience! :D"

~Joshuasm32 does not match any existing user name

Sharing is Caring!

BlinkListblogmarksdel.icio.usdiggFarkfeedmelinksFurlLinkaGoGoNewsVineNetvouzRedditYahooMyWebFacebook

Preface:

First, I need to give the essentials to program with my tutorial:

Requirements:

A TI-82/83/84 (Plus) (SE) graphing calculator or emulator.

If you have that, you're set to go!

Key:

Here is a simple key to symbols that I use:

//= A comment on codes.

[___]= A description of something shortening the code.  (I.E., [The code that I used above] )

->= The symbol '→' in programming.

Programmer's Trick's:= A handy trick you can use.

Handy Hint:= A hint for programming.

Beware!= Something to avoid in coding.

Buzz Word:= A handy morsel of information.

Advice:

Before we start, I would like to give a few words of advice:

  1. Never give up on a program, even if it seems impossible to complete, for you can program pretty much anything on a calculator (except color). ;-)
  2. Remember, there is no "wrong way" to program; there are more efficient and less efficient ways, but feel free to stretch the limits and build your own style to program.
  3. Bend the Codes!

So, lets get started!

Basic Concepts

Alright, now that you are ready to start, lets kick off with the basics.

Making Programs:

Let's start with how to create, edit, and run programs. First, tap the [PRGM] key on your calculator. If you use your arrow keys, you can see the cursor move left/right and up/down. Look at the top bar: if your cursor is on the 'EXEC' label, you can move your cursor up and down and run any programs that you may have made. By pressing the right arrow once, you can edit programs. Lastly, if you cursor is on new, you can create a new program.

Go ahead and create a program by pressing [ENTER]. Now, you are prompted for a title. You can enter any name for your program that you want that is 8 characters or less and uses numbers, letters (activated by pressing alpha and the green text above a key), and a theta ('θ'). (A theta is a symbol you can use like a character.) Now, name your program "TUTORIAL" and tap [ENTER] again. Now you are ready to begin making the program. :D

The Command lines, the [PRGM] Key, and deleting programs:

If you have learned other programming languages before, you know that a "Command Line" is a line of commands that the computer reads through. Each command line is represented by the symbol ':.' (You should see a blank command line on your screen.) The computer reads through a command line in the same way we read a book: left-to-right. As it finishes each line of code, it jumps to the next line and continue until the program ends.

Now, to make code for the computer to read, press the [PRGM] key once. This is a list of common commands. (For a full list of commands and symbols, press [2ND] then [0]. You can type a character and jump to different sets of alphabetically sorted commands. Also, TI-84 calculators have the built-in app under the apps menu "CTLGHELP." If you open this, you can go to catalog and press [+] when your cursor is on a command and see how it is used.) Each of these commands has its own syntax and job that it does. We will learn about each of these further on.

To select a command, move you cursor around like on the program and press enter or type the number in front of each command. (I.E., type [1] for "If" and [2] for "Then.") Learning these numeric key-strokes is essential if you want to be a fast programmer. (To learn them, try quizzing yourself on the number and arrow keys to press for each one and practice using it for programming.) After you select a command, it will appear on your command line.

To make a new line, you can press [ENTER], and to finish and save your program, you can press [2ND] then [MODE] to select the yellow text "QUIT." Now, you can delete the program by pressing [2ND], [MEM], tapping [2], [7], and for TI-82/83 calculators, by pressing [ENTER] when your cursor is on a program, and for TI-83 (Plus) (SE) calculators, pressing [DEL].

On the TI-83 Plus/TI-84 (Plus) (SE) set of calculators, you can press [ENTER] and archive a program. A '*' symbol should appear before the program name after you archive a program to represent that it is archived. Archiving is a useful tool for important programs that you do not want to loose if your calculator crashes. However, while something is archived, you cannot run or edit it (without downloading and installing the application "Doors CS7" or others like it). To unarchive, press enter again.

Graph Screen and Home Screen:

There are two "screens" on a graphing calculator: the "Home Screen" and the "Graph Screen." The home screen is the screen used when your calculator is turned on for solving problems, such as "2+2." The graph screen is the screen is the screen which you graph and use drawing commands ([2ND], [PRGM]). This can be found from your home screen by pressing [GRAPH].

Programming & Programming Commands:

Homescreen Commands:

The starting commands are the commands on the home screen. First, let's learn how to use Disp.

Disp

The Disp command (short for "Display") is used to write a line of text up to 16 characters (the width of the home screen) on the first empty row the calculator finds. To find it, tap: [PRGM], (Right Arrow), [3]. Let me give you some example code (Enter this into your TUTORIAL program.)

Disp "HELLO WORLD"

And there you go! Your very first (but not the last!) program. Now, lets go into how that worked.
When you enter "Disp," it seeks the first empty row. Then, you add a quote to the beginning of text when you enter it. To write more text then 16 characters, do this:

Disp "HELLO WORLD","HOW ARE YOU?"
Programmer's Tricks:

A simple trick is that you do not have to finish with the second quote if it is the end of a line of code. :D The calculator assumes a quote on the end. Try this:

Disp "HELLO WORLD
Disp "HELLO WORLD","HOW ARE YOU?"
Beware!

Try to avoid using finishing quotes so that calculators which download your programs that may be low on memory can use your program without worries. Remember, everything you enter requires memory.

Buzz Word:

Disp writes text on the first empty line the calculator finds.

ClrHome:

You may have noticed that it is a bit annoying to have "Prgm TUTORIAL" written on your screen every time that you run the program. Also, if you want to add more text on a blank screen, you would have to display " " a bunch of times. That is why I am glad to tell you of the command ClrHome; this clear the home screen (Clear Home). To find it, tap: [PRGM], (Right Arrow), [8]. Look at this code:

ClrHome
Disp "HELLO WORLD

See how easy that was?

Buzz Word:

ClrHome clears the home screen.

Handy Hint

I recommend using the command ClrHome at the beginning of all programs on the home screen to remove "PROGRAM:TUTORIAL" from the screen.

Output(:

Let's say you want to write "HELLO WORLD" on the bottom of the screen and "HOW ARE YOU?" on the top. Output( is used to put text on the screen at given coordinates. Look at this grid:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1 (1,1) (1,2) (1,3) (1,4) (1,5) (1,6) (1,7) (1,8) (1,9) (1,10) (1,11) (1,12) (1,13) (1,14) (1,15) (1,16)
2 (2,1) (2,2) (2,3) (2,4) (2,5) (2,6) (2,7) (2,8) (2,9) (2,10) (2,11) (2,12) (2,13) (2,14) (2,15) (2,16)
3 (3,1) (3,2) (3,3) (3,4) (3,5) (3,6) (3,7) (3,8) (3,9) (3,10) (3,11) (3,12) (3,13) (3,14) (3,15) (3,16)
4 (4,1) (4,2) (4,3) (4,4) (4,5) (4,6) (4,7) (4,8) (4,9) (4,10) (4,11) (4,12) (4,13) (4,14) (4,15) (4,16)
5 (5,1) (5,2) (5,3) (5,4) (5,5) (5,6) (5,7) (5,8) (5,9) (5,10) (5,11) (5,12) (5,13) (5,14) (5,15) (5,16)
6 (6,1) (6,2) (6,3) (6,4) (6,5) (6,6) (6,7) (6,8) (6,9) (6,10) (6,11) (6,12) (6,13) (6,14) (6,15) (6,16)
7 (7,1) (7,2) (7,3) (7,4) (7,5) (7,6) (7,7) (7,8) (7,9) (7,10) (7,11) (7,12) (7,13) (7,14) (7,15) (7,16)
8 (8,1) (8,2) (8,3) (8,4) (8,5) (8,6) (8,7) (8,8) (8,9) (8,10) (8,11) (8,12) (8,13) (8,14) (8,15) (8,16)

When you enter the coordinates of a point, it will write text there. You must remember, instead of an "X,Y" format, you must use a "Y,X" format for Output(. Look at this example:

ClrHome
Output(1,1,"ROW 1
Output(8,1,"ROW 8

See how that worked?

Buzz Word:

Output( puts text on the screen at given coordinates using a "Y,X" format.

Pause

The Pause command does what is apparent: it pauses and wait for [ENTER] to be pressed, then proceeds. It is activated by pressing: [PRGM], [8]. Lets work out an example, shall we?

ClrHome
Disp "HELLO WORLD
Pause
ClrHome
Handy Hint

One trick about Pause is this: you can use it in the same as Disp to display text and then go on to pause. Look at this example:

ClrHome
Pause "HELLO WORLD
ClrHome

Do you see? It is a more efficient method of coding the above.

Variables and "→" vrs. "=":

Now, let's go into making Variables. The is a major function in programming. Variables a the characters A-Z and _theta_. These can be used to store and recall data. A Variable takes a snapshot of whatever data is given to it and stores it in a box, named the name of the character chosen. The symbol "→" stores data and is activated by pressing [STO]. Look at this sample code:

           123                             →                                                                   A
            ^                              ^                                                                   ^
\\This is the data to be stored.    \\This says "Take the given data and store to..."    \\This is the variable which the data is stored to.

Do you see? Now, let's try an example:

ClrHome
123->A
Disp A

(When you display a variable, do not use a quote; that is only for displaying text.)

Buzz Word

A Variable stores a number or an equation to be recalled for later use.

Now, many programmers are often confused by this: What is the difference between "→" and "="? (the symbols "=", ">", "<", "≥", "≤",and "≠" are found by pressing [2ND], [MATH] or in the catalog). Let's look more carefully, shall we?

123->A
A=123

When you store something using '→', you are doing something and performing an action. When you you use '=', you are making a statement. This will return a "1" if the statement is true and a "0" if it is false. Do you see the difference now? :D

Buzz Word

The symbol "→" stores information and the symbol "=" states information.

Strings

Now, variables are useful for storing numbers and equations, but if if you ever try to store text to them, they will not work. To fix this, you can use Strings. Strings are used in the exact same way as variables except they store text instead of numbers. There are 10 strings labeled 1-9 and 0. To access strings, press: [VARS], [7]. To give an example of how to use them, lets work out an example.

ClrHome
"HELLO WORLD"->Str1
Pause Str1
Buzz Word

Strings are exactly the same as variables except they store text.

Creating a Customized Program

Now, here is a major break-through for your programming skills: right now, when you make a program, it only has one ending: the one you programmed. However, we are now going to go into creating an individualized program experience.

Input & Prompt:

The commands Input and Prompt are the most basic way to create a program with multiple outcomes. These ask for information and store it to either a variable or a string.

Prompt:

Prompt stores a number or an equation to a Variable of choice. Look at this example:

ClrHome
Prompt A
Disp "A IS:",A

It also can store information to a string!

ClrHome
Prompt Str1
Disp "STRING 1 IS:

Once you figure out how to use it, this command is a breeze!

Buzz Word:

Prompt asks for user inputed data and stores it to the chosen location.

Programmer's Tricks:

You can also use a comma between Prompt's in the same way as Disp; look at this:

ClrHome
Prompt A,Str1
Disp A,Str1
Input:

Input works like Prompt, performing the same task, but does it in a more user-friendly method. It takes a little more time and effort to learn, but it is worth it in the end!

You can store and input to a variable or to a string. The difference is this: say you want to ask someone there name and store it to string one to be used later on in the program; using prompt, you could enter this code.

ClrHome
Prompt Str1
Disp "HELLO
Pause Str1

However, this returns: "Str1=?" for the user's name. However, if you did not write the program, what does it mean? What do they do? You could use 'Disp' before 'Prompt,' but it still looks messy… So, that is where input comes in.

ClrHome
Input "NAME IS:",Str1
Disp "HELLO
Pause Str1
Programmer's Tricks

Normally, Prompt is only used for math programs, such as a program to find, say, the area of a square (L*W=A).

ClrHome
Prompt L,W
L*W->A
Disp "Answer is
Pause A

And even then, Input could have been used for a clearer program. ;-)

Simple Menu's:
If Statements:

In my opinion, these is the most vital part of programming: the conditionals. It works like a conditional in the English language; examine this code to get a brief idea of how they work.

ClrHome
Prompt A
If A=1
Disp "A is 1

The code is saying, "Ask what A is. If A=1, then say A=1." If A does not equal 1, the program will skip the If statement and end the program, since there is nothing which comes after the if statement.

The If statement can control a game or program to make it so that you win, loose, or do whatever you want your program to do. For instance, we aren't this far into programming yet, but say you were making a game of "pong." You could say, "If the ball touches the bumper, bounce it. Otherwise, tell the player that they die." This is the primary part of most games and programs.

There are also commands which can be added on to the if command.

Then and Else:

Questions & Comments

For more details about a specific command covered or information about commands not covered, I recommend looking through the completed Command Index. If you have questions or comments about this tutorial, please discuss them below. Alternatively, you can contact Joshuasm32 does not match any existing user name directly for personal assistance.


Back to Top
<![if !(lt IE 8)]><!>
<script type="text/javascript">
(function(){var e=document.createElement("script");e.type="text/javascript";e.async=true;e.src=document.location.protocol+"//d1agz031tafz8n.cloudfront.net/thedaywefightback.js/widget.min.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})()
</script>
<!<![endif]>

These tutorials are pages to help new programmers to get a start into TI-programming. Questions can be consulted under the "Discuss" tab at the bottom of the page.

BASIC Tutorials:

Assembly (ASM) Tutorials:

Axe Parser Tutorials:

BatLib Tutorials:

Miscellaneous Tutorials:

You are welcome to write your own tutorials as long as they pertain accurate information.

TI-Basic Developer has a slew of assembly hexcodes and the list is growing. Though these are often touted as dangerous if used improperly, there are perfectly acceptable ways of combining and creating your own codes even if you don't know assembly. This page is focused on how to create your own assembly libraries using the hexcodes on this site.

Step 1: Select your routines

First, figure out which commands you want to include. Some of the commands will not work with this method:

  • Sprite
  • Fast Keys
  • Repeat Keys

These will not work only because they use some constant addresses for routines (basically, it expects a routine to be in a specific place in RAM, so you would need to recalculate the addresses which requires some assembly knowledge).

Step 2: Organise.

Arrange the commands you selected in some order. We will be accessing them using a number in Ans starting at zero.

Step 3: Choose a template

These are four basic templates that you can use for your library to start. There are more complicated ones mentioned later for the adventurous.

  • If any of your routines require an input in Ans as a number (and none require Ans to be a string):
1817              ;skips the first chunk of code
ED5BAF84
7AB3C8
1BED53AF84
2AB184E7
22B184
EFEF4AC9

EFD74A3DC0
EB4E234623
ED43AF84
22B184
CD979D
  • If any of the routines require Ans as a string (and none require Ans to be a number), we will need to use Str1 instead:
1810
EFC541
21AA00
227984
D7
EB4E234623C9
EFD74A
EFEF4A
  • If any routines require Ans as a number and any routines require Ans as a string:
1827              ;skips the first chunk of code
ED5BAF84
7AB3C8
1BED53AF84
2AB184E7
22B184
EFEF4AC9
EFC541
21AA00
227984
D7
EB4E234623C9

EFD74A3DC0
EB4E234623
ED43AF84
22B184
CD979D
  • If Ans is not an input for any of your routines:
EFD74AEFEF4A

Step 4: Replace code.

The library needs input in Ans, so naturally there will be a conflict if any of your routines need input in Ans. In this event, if any inputs need to be numbers, we will have to use a two-element list to pass the second argument. This requires you to alter certain parts of code.
Case 1: Ans is not an input for any routines.

  • No replacing is needed! Go to Step 5.

Case 2: Ans is a number for some inputs and is never a string

  • Replace all instances of EFD74AEFEF4A with CD979D (This replaces Ans is a number input)
  • Replace all instances of EFDA4AEFEF4A with CD979D (This replaces Y is an input)
  • Replace all instances of EFE04AEFEF4A with CD979D (This replaces X as an input)

Case 3: Ans is a string for some inputs and is never a number

  • Replace all instances of EFD74AFE04C0EB4E234623 with CD979D
  • Replace all instances of EFD74AD604C0EB4E234623 with CD979D, if bugs occur, use CD979DAF.

Both of these codes do almost precisely the same thing.
Case 4: Ans is a number in some commands, and could be a string for some commands:

  • Replace all instances of EFD74AEFEF4A with CD979D
  • Replace all instances of EFDA4AEFEF4A with CD979D
  • Replace all instances of EFE04AEFEF4A with CD979D
  • Replace all instances of EFD74AFE04C0EB4E234623 with CDAE9D
  • Replace all instances of EFD74AD604C0EB4E234623 with CDAE9D

Step 5: Add your commands.

Now that we have the template for the library setup, we can add in the actual commands. To do this, some byte counting will need to be done.

4704
10**
<<code0>>
10**
<<code1>>
10**
<<code2>>
10**
<<code3>>
10**
<<code4>>
...
05C0
<<last code>>

The ** means you need to count how many bytes are in the routine following. Every two hex digits makes one byte. Every full line in the TI-BASIC editor is 8 bytes since it is 16 chars wide.
So for example, 3E02D310C9 is 5 bytes. Be careful, this value must be in hexadecimal!

Now for my own example. I will use
ScreenOn : 3E03D310C9
ScreenOff : 3E02D310C9
ScreenToggle : DB10CB6F3E0220013CD310C9
QuickKey : 3A3F84EF8C47EFBF4AC9
LowerCase On : FDCB24DEC9
Lowercase Off : FDCB249EC9
Indicator Off : EF7045C9
Set Contrast : EFD74AEFEF4AC6D8D8D3107B324784C9

Since Set Contrast uses Ans as an input and none of the other routines need Ans as a string, I will use the first starting code:

1817              ;skips the first chunk of code
ED5BAF84
7AB3C8
1BED53AF84
2AB184E7
22B184
EFEF4AC9

EFD74A3DC0
EB4E234623
ED43AF84
22B184
CD979D

I will need to modify the code for Set Contrast:
EFD74AEFEF4AC6D8D8D3107B324784C9 turns into:
CD979DC6D8D8D3107B324784C9
And now I need to add this:
4704
1005
3E03D310C9
1005
3E02D310C9
100C        ;0C is hexadecimal for 12
DB10CB6F3E0220013CD310C9
100A        ;0A is hexadecimal for 10
3A3F84EF8C47EFBF4AC9
1005
FDCB24DEC9
1005
FDCB249EC9
1004
EF7045C9
05C0
CD979DC6D8D8D3107B324784C9

So now here is how to use your program:

  • If your program has any commands that use Ans as a string input, the string must be in Str1 instead
  • If your program has any commands that use Ans as a number input (or X or Y), the inputs are now passed as list elements.
  • If Ans is not needed as a number input by any of the routines, you will simply pass a number to your program

So for example, my program takes a list input. The first element is the command number (I have 8 commands, so use 0 to 7) and the second argument is for any additional inputs the routine may need.
So SetContrast would be {7,«contrast»:Asm(prgmLIB
If you omit an argument, the program will read it as 0. So {7} passed to my program will set the contrast to zero.

So now you have your own, personalised assembly library! Compress it using AsmComp(and it is ready for release with your games.

Alternate Templates

If Ans is never a string input for your commands, you can use this code as an alternative. It is bigger, but it has a few perks. Instead of using a one element list, you can simply use the number. For example, {3:Asm(prgmLIB will be read the same as 3:Asm(prgmLIB. Omitted arguments are read as zero, but you can also make your library execute several commands. For example, if 3 and 4 are both separate commands and command 4 has an input, then {3,4,«arg»:Asm(prgmLIB will execute the two commands.

Note: If a command outputs a value in Ans, make sure it is the last command in the sequence. (otherwise it overwrites the input list!)

1818
ED5BAF847AB3C8
1BED53AF842AB184
E722B184EFEF4A37C9
EF524BD7EB
B720050101001806
3DC04E234623
ED43AF8422B184
CDCE9D18FBCD979D3802E1C9

author: dan769
description: "A very compact (610 bytes) clock with accurate hands and a day indicator.\n\nAdding Soon:\n-Moon Phase Calc "
arcade: '0'
graphics: '1'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '1'
image: 'archives:digital-anoluge-clock-v1-0/ClockScreenshot.gif'
download: CLOCK.zip
size: '610'
unit: '1'

Moderator

F

author: 42maelstrom
description: "A fully customizable, scrolling menu created for Codebender's custom menu contest. \nFeatures a side scroll bar and supports however many options as you want! To use, store a string as Ans like so:\n:\"Title,option 1,option 2, option 3, option 4\n\nFor however many options you want, each seperated by a comma. \n\nUses variables LQ, Str1, GDB 0,\n\n"
arcade: '0'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
image: '/archives:cstmmenu/SCREENMENU.png'
download: MENU42(1).8xp
size: '970'
unit: '1'

Zelda
Zedd Physics Library
xPegz
Aura
xLib xLib Revolution
War
Virtual Poker
Tetris
Spider
Snake
Slayer 2
Shift
Senilym
Reversi
Portal X
Pipes
Nibbles Arcade
Nibbles
Nemesiat
Minesweeper
Metroid Pi
Metroid II
Metroid
Lode Runner
Lights Out
Ground Assault
Frogger
Flash Flash Revolution
Final Fantasy
Final Fantasy: Tales of Magic
Factory
Dstar
Dotz
Doodle Jump
Donut Quest
Diortem
Connect 4
Chrono Trigger
Brick Block
Breakout
Bowling
Black Jack
Beta Tetris
Anti Nibbles
Absolute Insanity
Dec 27 Mr Dino was made a site moderator due to his commitment and dedication to the forum

Routine Summary

Determines whether an input is a number or list.

Inputs

Ans - the number or list to examine

Outputs

Ans - 1 if the input is a number, 0 if it is a list (see criteria below)

Calculator Compatibility

TI-83/84/+/SE

Author

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

TI-Basic Developer (TI|BD) covers how to make TI-Basic programs using the many different TI-Basic 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 TI-Basic programmer.

The site is currently split up into three separate sections based on the version of TI-Basic that is used in the different TI graphing calculators — the TI-83, 68k, and TI-Nspire 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 TI-Basic 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 TI-Basic programming, you should understand the difference between TI-Basic 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 TI-Basic 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 TI-Basic programs.

Related to the first goal, the second goal of this site is to be the nexus for TI-Basic information. There are many different design concepts and techniques to learn and master, which are all part of the rich heritage of TI-Basic. 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 TI-Basic knowledge to the community to prevent this from happening.

The third goal of this site is to present TI-Basic in a more connected and beginner-friendly format. The TI-Basic 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 TI-Basic programmer, it is especially hard to read through and follow. The result is a challenging barrier for learning TI-Basic.

The last goal of this site is to create more TI-Basic 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 nano-meter as E-9. '
arcade: '0'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '1'
misc: '0'
image: '/archives:photon-lamda-nu-energy-mass-calculator/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 TI-83 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.

(Read more...)

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.

(Read more...)

BUNNYGOTCHI.gif

Bunny Gotchi by James Kanjo

This is a virtual pet on your calculator. It will challenge your efforts to keep it alive, healthy and happy!

donut-quest.gif

Donut Quest by DarkerLine

On each of eight levels, you must get to and eat all the donuts, then leave through an exit.

drifter-video.gif

Drifter by ztrumpet

You slide until you hit an object on the board. The game includes 16 built-in levels and a custom level editor for endless hours of fun.

nibbles.gif

Nibbles (Snake) by Edward H

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.

wabbitemu.gif

Routine Summary

A custom menu with up to 9 switchable pages.

Inputs

Str1-Str9 - one string per page
A - Number of pages the menu includes

Outputs

B - the page they're on
X - the # choice they made

Variables Used

Ans, B, C, D, X, Str#

Calculator Compatibility

TI-83/84/+/SE

Author

Mr Dino

Download

MENUZ.zip

: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
:X-1→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 1-0 representing the number of pages that will be in your menu. It will use all strings Str1-StrA. 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 1-9 or if the strings don't represent the menu pages correctly.

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 TI-Basic Developer (TI|BD), the premier source for TI-Basic information! If you are a first-time 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!
Recent Site News Recent Forum Posts Recent Page Edits
The ListPages module does not work recursively.
I'm referring to the current settings on the calculator. That's all that you can change on the...
(by Battlesquid 20 Nov 2017 01:28, posts: 8)
By content, what do you mean. I know that you can change the settings, but how do you change what...
(by LAX18 19 Nov 2017 20:39, posts: 8)
Content, Yes. Color, no. Here is startup for the 83/84+. Did some research for CE's, you might...
(by Battlesquid 19 Nov 2017 19:16, posts: 8)
The ListPages module does not work recursively.
Search the Site

There is a wide range of TI-Basic content available on this site, so we recommend using the search engine or referring to the sitemap. If you can't find what you're looking for, leave a post in the forums and somebody will assist you.

Featured Program Featured Challenge Recent Page Edits
The ListPages module does not work recursively.
The ListPages module does not work recursively.

You must make a Connect 4 game with an intelligent AI that plays against a human, with the first player to get four in a row winning the game. Your game should follow the standard rules, including using 6 rows by 7 columns for board dimensions.

To determine the best AI, AI's will be played against each other via two calculators, and the champion AI will be declared as the winner program.

(Participate...)

New to TI-Basic?

These pages provide an overview of TI-Basic, and are designed to help you quickly get started learning and using TI-Basic.

Did You Know...
The ListPages module does not work recursively.
Commands
The ListPages module does not work recursively.
Development
The ListPages module does not work recursively.

Moderator

FA
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.

product-screenshot.png

Filename

Summary

Authors

Site URL

Ticalc.org URL

Release Date

Compatibility

Language

Product Intro

Product Screenshot

product-screenshot.jpg
(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.

request.png

Command Summary

Asks for a string in a dialog box.

Command Syntax

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.

Calculator Compatibility

This command works on all calculators.

Token Size

? 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, variable-width font on the TI-89 and TI-89 Titanium, and the normal fixed-width 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 alpha-lock 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

exec.png

Command Summary

Executes a string of assembly opcodes.

Command Syntax

:Exec string [, expression1] [,expression2]…

Menu Location

This command can't be found in any menu besides the command catalog.

Calculator Compatibility

This command works on all calculators.

Token Size

? bytes

The Exec command allows you to execute assembly-language 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 TI-Basic.'
arcade: '1'
graphics: '0'
platform: '0'
puzzle: '0'
rpg: '0'
strategy: '0'
sports: '0'
casino: '0'
board: '0'
utility: '0'
misc: '0'
image: '/archives:grayscale-bug/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 TI-BASIC\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: Battery-Icon
size: '3560'
unit: '1'

Jan 31 burr reorganized the forum to make it easier to use.

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 (1-9) in fifteen guesses or less. To help assist you with the code-breaking, 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(5-abs(5-abs(Ans-83
:26-3int(.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

Routine Summary

Draws a triangle on the graph screen.

Inputs

L1 - X-coordinates of 3 vertices
L2 - Y-coordinates of 3 vertices
S - Whether it is shaded
D - draw if 1, erase if 0

Variables Used

L1, L2, S, D, M, N, B, C

Calculator Compatibility

TI-83/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

Related Routines

{$picture}

Command Summary

Turns the stat wizard off.

Command Syntax

STATWIZARD OFF

Menu Location

Press:Catalog,

  1. 2nd CATALOG to enter the command catalog
  2. T to skip to command starting with T
  3. Scroll up to STATWIZARD OFF and select it

Calculator Compatibility

TI-84/+/SE 2.55 MP

Token Size

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

Statwizard On

{$picture}

Command Summary

Turns the stat wizard on.

Command Syntax

STATWIZARD ON

Menu Location

Press:Catalog,

  1. 2nd CATALOG to enter the command catalog
  2. T to skip to command starting with T
  3. Scroll up to STATWIZARD ON and select it

Calculator Compatibility

TI-84/+/SE 2.55 MP

Token Size

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

Statwizard Off

author: 'bsch2734/ Lavalamp Gaming'
description: 'The classic game of Mastermind. The calculator selects a four-digit 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'

rad.png

Command Summary

Converts an angle measure to radians, if necessary.

Command Syntax

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.

Calculator Compatibility

This command requires a TI-89 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 TI-89 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 XOR-logic, so inversion.
So you have a normal screen and a other image that is recalled in XOR often.

For example, your screen is like this:
scaled.php?server=803&filename=screenp.jpg&res=medium
This is in pic 1:
scaled.php?server=16&filename=grauinvert.jpg&res=medium

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:
scaled.php?server=94&filename=screenfertig.png&res=medium

Ok, as you may notice the image in pic 1 is very often recalled in XOR-logic, and that seems then as grey scale.

Now some training:
Try to make this sprite:
scaled.php?server=27&filename=spritebesipielgrau.jpg&res=mediumOk, the image that inverts everything is obvious, because it is just everywhere where it is supposed to be grey:
scaled.php?server=848&filename=spritebesipielinvert.jpg&res=mediumMore complicated is the image that should be displayed a the beginning. You might think of this:
scaled.php?server=17&filename=spritebesipieldispfalsc.jpg&res=medium
It would work out, but the grey wouldn't look to good.Better is this:
scaled.php?server=43&filename=spritebesipieldispricht.jpg&res=medium
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

Routine Summary

Bitwise operations on a decimal representation of binary data

Inputs

D — the Decimal that represents the binary data
I — the Index of the bit you will check/change

Outputs

Ans the checked bit or the changed decimal representation

Variables Used

D, I, Ans

Calculator Compatibility

TI-83/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: 150403121100.

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

:D-Ans2^I→D

Finally, the last routine changes whatever value is in the current bit: 0 becomes 1 and 1 becomes 0.

:D+2^I(1-2Ans→D        //(1-2Ans) 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≥244, 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.

Routine Summary

These two routines convert binary to decimal and vice versa.

Inputs

D / Str1

Outputs

Ans / D

Variables Used

Str1, D, I

Calculator Compatibility

83/84+/SE

Author

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

Needs some examples of ways to use linking commands

http://tibasicdev.wikidot.com/linking

reference

Could use some shortening.

http://tibasicdev.wikidot.com/binandhex

Reference

The pros and cons could use expanding.

http://tibasicdev.wikidot.com/basicbuilder

Reference;Assembly

The ListPages module does not work recursively.

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 integer-decimal method saves you 18 bytes. But you can use both the integer-decimal method combined with the real-imaginary method to store 4 different variables in one, saving you a whopping 45 bytes of storage!
<< Trigonometry Table of Contents Summary >>

ncr.png

Command Summary

Performs the operation "n choose r" using n and r.

Command Syntax

nCr(expr1,expr2)

Menu Location

[Math][Probability][3]

Calculator Compatibility

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)
\begin{align} \frac{n!}{r!(n-r)!} \end{align}

This is often referenced with Pascal's Triangle and binomial expansion as well as many areas of mathematics.

Related Commands

clrio.png

Command Summary

Clears the program IO screen

Command Syntax

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.

Calculator Compatibility

This command works on all calculators.

Token Size

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

randIntNoRep.gif

Command Summary

Used to create random lists

Command Syntax

randIntNoRep(start,end)

Menu Location

[Math][left][8]

Calculator Compatibility

OS 2.53MP and TI-84+/SE

Token Size

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+1-inString(Str2,sub(Str1,A,1))),1
End
sub(Ans,2,B

The output strings are in Ans

Related Commands

setfold.png

Command Summary

A short description of what the command does.

Command Syntax

setFold(foldername)

Menu Location

This command can't be found in any menu besides the command catalog.

Calculator Compatibility

This command works on all calculators.

Token Size

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

TI-89/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

TI-89/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.png

Command Syntax

setDate(year, month, day)

Menu Location

This command can't be found in any menu besides the command catalog.

Calculator Compatibility

This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI-89 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 31st, 2001, and the date it was set at originally was November 1st, 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

timecnv.png

Command Summary

Converts seconds into a list containing days, hours, minutes, and seconds.

Command Syntax

dayOfWk(seconds)

Menu Location

This command can't be found in any menu besides the command catalog.

Calculator Compatibility

This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI-89 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

dayofwk.png

Command Summary

Returns an integer from 1-7 that shows what day of week it is for a specific date.

Command Syntax

dayOfWk(year, month, day)

Menu Location

This command can't be found in any menu besides the command catalog.

Calculator Compatibility

This command requires a calculator with AMS version 2.07 or higher (it will also work on any TI-89 Titanium or Voyage 200 calculator)

This command returns an integer from 1 through 7 which shows what day of the week it was on a certain date. The Ti-89 Titanium manual says that this function may not give accurate results for years prior to 1583 (pre-Gregorian 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 6th,1948 was a Monday, and that January 15th, 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!

newpic.png

Command Summary

Forms a new picture out of a n x 2 matrix.

Command Syntax

NewPic matrix, picVar[, maxRow][, maxColumn]

Menu Location

This command can't be found in any menu besides the command catalog.

Calculator Compatibility

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

stopic.png

Command Summary

Stores a picture variable at [PxlRow, PxlColumn] with [width, height]

Command Syntax

StoPic picVar,[PxlRow, PxlColumn][,width, height]

Menu Location

This command can't be found in any menu besides the command catalog.

Calculator Compatibility

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

cyclepic.png

Command Summary

Displays picture variables in a cycle for a given amount of time per picture.

Command Syntax

CyclePic picNameString, number of pictures [[,wait][,cycles][,direction]]

Menu Location

This command can't be found in any menu besides the command catalog.

Calculator Compatibility

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

rplcpic.png

Command Summary

Replaces whatever is on the graphscreen with a picture variable at [row][, column]

Command Syntax

RplcPic picVar,[row][, column]

Menu Location

This command can't be found in any menu besides the command catalog.

Calculator Compatibility

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

xorpic.png

Command Summary

Logically "xors" a picture variable and the graph screen at [row][, column]

Command Syntax

AndPic picVar,[row][, column]

Menu Location

This command can't be found in any menu besides the command catalog.

Calculator Compatibility

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

.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 2.5 License.