[MrGibson.com TI Home] [MrGibson.com Home]
TI-89 (68k series) BASIC

For the: 
     TI-89               Calculator
     TI-89 Ti (Titanium) Calculator 
     TI-92               Handheld
     TI-92 II            Handheld
     TI-92 Plus          Handheld
     TI Voyage 200       Handheld
     
     For the era of TI Motorola 68K powered modern handheld calculators/computers!
     
     How is TI BASIC different from other BASICs?
     
     1. Storage of variables.
     
     storing number 1 in the variable x.
     
     Wisth Microsoft BASIC, ANSI BASIC, or TI 1979 to 1989 BASIC:
     
     x=1
     
     with TI BASIC
     
     1→x
     
     

abs() The abs() command returns the absolute value of an expression. The absolute value of a real number is the number of units from 0 the number is. The absolute value of 9 for example is 9 because it is that many units away from zero. The absolute value of -9 however is 9. abs() will always return a positive value. Examples: :abs(7) returns 7 :abs(-7) returns 7 :1→i :abs(3+4i) returns 7
and The and operator combines two conditions into one, which will be true if both sides are true, and false otherwise. You can create these conditions with the relational operators =, ≠, >, ≥, <, and ≤, with functions such as isPrime(), pxlTest(), and ptTest(), or with any other expression that returns 'true' or 'false'. Other operators for dealing with conditions are or, xor, and not. :2+2=4 and 1=0 false :2+2=4 and 1+1=2 true The operator can also be applied to integers, treating them as 32-bit signed integers (larger integers will be truncated to fit) expressed in binary. The bits will be matched up, and "and" will be applied to the bits individually — a bit in the result will be 1 if the two corresponding bits of the original integers were 1, and 0 otherwise. X or Y and Z will be interpreted as: X or (Y and Z)
AndPic Displays the Graph screen and superimposes a stored graph picture by using AND logic. The AndPic command logically takes the picture variable specified, and takes the current graph, and it finds the points at which both the graph and the picture have pixels, and it displays them only. If specified, [row,column] tells where the top left corner of the picture is to be placed. If not specified, the default is (0,0), which is the top left corner of the screen.
angle() Command returns the angle of a complex number.
ans() The Ans(x) holds the last answers that were stored. if x=1 then first answer, x=2 then second, ect.
approx() The approx() command forces an expression to be evaluated in approximate mode, temporarily ignoring the mode setting. Example: :approx(π) returns 3.14159265359
arcLen() Returns the arc length of an expression with respect to a specified variable.
augment() when lists are used as arguments, a list is returned that is list2 appended to list1 Example: :augment({1,⁻3,2},{5,4})
avgRC() avgRC(expression1, var [, h]) Returns the forward-difference quotient (average rate of change). expression1 can be a user-defined function name. h is the step value. If h is omitted, it defaults to 0.001.
BldData [dataVar] BldData [dataVar] Creates data variable dataVarbased on the information used to plot the current graph. BldDatais valid in all graphing modes. If [dataVar] is omitted, the data is stored in the system variable sysData.
ceiling() ceiling() MATH/Number menu ceiling(expression1) ⇒integerReturns the nearest integer that is ‚the argument. The argument can be a real or a complex number. Note:See also floor()
cFactor() cFactor() MATH/Algebra/Complex menu cFactor(expression1[, var]) ⇒expression cFactor(list1[,var]) ⇒list cFactor(matrix1[,var]) ⇒matrix cFactor(expression1)returns expression1 factored with respect to all of its variables over a common denominator. expression1is factored as much as possible toward linear rational factors even if this introduces new non-real numbers. This alternative is appropriate if you want factorization with respect to more than one variable.
char() Returns the character that corresponds to a secified character code. This is the opposite of the ord command. The char() command converts an integer between 0 and 255 to the corresponding ASCII character. Appendix A: ASCII code table (Dec value, Character ) C# Char C# Char C# Char C# Char C# Char C# Char 32 [SP] 48 0 64 @ 80 P 96 ` 112 p 33 ! 49 1 65 A 81 Q 97 a 113 q 34 " 50 2 66 B 82 R 98 b 114 r 35 # 51 3 67 C 83 S 99 c 115 s 36 $ 52 4 68 D 84 T 100 d 116 t 37 % 53 5 69 E 85 U 101 e 117 u 38 & 54 6 70 F 86 V 102 f 118 v 39 ' 55 7 71 G 87 W 103 g 119 w 40 ( 56 8 72 H 88 X 104 h 120 x 41 ) 57 9 73 I 89 Y 105 i 121 y 42 * 58 : 74 J 90 Z 106 j 122 z 43 + 59 ; 75 K 91 [ 107 k 123 { 44 , 60 < 76 L 92 \ 108 l 124 | 45 - 61 = 77 M 93 ] 109 m 125 } 46 . 62 > 78 N 94 ^ 110 n 126 ~ 47 / 63 ? 79 O 95 _ 111 o Appendix B: TI Char set in Hex values and Dec below character.
checkTmr() CATALOG checkTmr(starttime) ⇒integer Returns an integer representing the number of seconds that have elapsed since a timer was started. starttime is an integer returned from the startTmr() function. You can also use a list or matrix of starttimeintegers. Valid starttime integers must fall between 0 and the current time of the clock. You can run multiple timers simultaneously. Note:See also startTmr()and timeCnv().
Circle Circle x, y, r[, drawMode] Draws a circle with its center at window coordinates (x,y) and with a radius of r. x, y, and rmust be real values. If drawMode = 1, draws the circle (default). If drawMode = 0, turns off the circle. If drawMode = -1, inverts pixels along the circle. Note: Regraphing erases all drawn items. The Circle command allows a person to draw a circle on the graphscreen. It can be drawn using the given keystrokes, or it can be called at the homecreen by typing it out. Example: :showcir() :Prgm :Circle 0,0,5 :Pause :EndPrgm Will draw a circle with a center of (0,0) and a radius of five. Will show until enter is pressed. See also PxlCrcl.
ClrDraw The ClrDraw command is useful clearing away something drawn on the graph screen
ClrErr Clears the error status and sets the error number in system variable Errornum to zero.
ClrGraph Erases any functions or expressions that were graphed with the Graph command. ClrGraph Clears any functions or expressions that were graphed with the Graphcommand or were created with the Tablecommand. (See Graphor Table.) Any previously selected Y= functions will be graphed the next time that the graph is displayed.
ClrHome Resets the cursor position to the top left corner of the home screen. ClrHome Clears all items stored in the entry() and ans() Home screen history area. Does not clear the current entry line. While viewing the Home screen, you can clear the history area by pressing ƒand selecting 8:Clear Home. For functions such assolve()that return arbitrary constants or integers (@1, @2, etc.), ClrHomeresets the suffix to 1
ClrIO ClrIO Clears the Program I/O screen 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. Example: :hellowld() :Prgm :ClrIO :Disp "HELLO, WORLD!" :Pause :ClrIO :DispHome :EndPrgm
ClrTable The ClrTable command clears all calculations for the table screen.
colDim() colDim(matrix) Returns the number of columns contained in matrix. colDim([0,1,2;3,4,5])¸ would return 3
conj() conj(z) returns the complex conjugate of the complex number z. If z is represented as x+iy where x and y are both real, conj(z) returns x-iy. Also works on a list of complex numbers. Example: conj(3+4i) would return 3-4i
CopyVar Copies the contents of a variable. Example: CopyVar var1, var2 Copies the value of var1 into var2. Whereas Store copies the result of an expression into another variable, CopyVar will copy the value of the variable itself. :CopyVar y,z
cos() cos(expression1) returns the cosine of the argument as an expression. cos(list1) returns a list of the cosines of all elements in list1. Example: :cos(45)
cosh() cosh(expression1) returns the hyperbolic cosine of the argument as an expression. cosh (list) returns a list of the hyperbolic cosines of each element of list1.
crossP() crossP(list1, list2) Returns the cross product of list1 and list2 as a list. list1 and list2 must have equal dimension, and the dimension must be either 2 or 3.
cSolve() cSolve(equation, var) Returns candidate complex solutions of an equation for var. The goal is to produce candidates for all real and non-real solutions. Even if equation is real, cSolve() allows nonreal results in real mode.
CubicReg CubicReg list1, list2[, [list3] [, list4, list5]] Calculates the cubic polynomial regression and updates all the statistics variables. All the lists must have equal dimensions except for list5. list1 represents xlist. list2 represents ylist. list3 represents frequency. list4 represents category codes. list5 represents category include list.
cumSum() cumSum() calculates the cumulative sums of a list, or of the columns of a matrix, and outputs them in a new list or matrix variable. For a list, this means that the Nth element of the result is the sum of the first N elements of the list: cumSum({1,3,5,7,9}) stores {1 4 9 16 25} For a matrix, cumSum() is applied to each column in the same way as it would be for a list (but numbers in different columns are never added): [[0,1,1][0,1,3][0,1,5][0,1,7]] [[0 1 1] [0 1 3] [0 1 5] [0 1 7]] cumSum(Ans) [[0 1 1] [0 2 4] [0 3 9] [0 4 16]]
Cycle Transfers program control immediately to the next iteration of the current loop (For, While, or Loop). Cycle is not allowed outside the three looping structures (For, While, or Loop).
CyclePic CyclePic picNameString, n [, [wait] , [cycles], [direction]] Animates a series of stared graph pictures. Displays all the PIC variables specified and at the specified interval. The user has optional control over the time between pictures, the number of times to cycle through the pictures, and the direction to go, circular or forward and backwards. direction is 1 for circular or ë1 for forward and backwards. Default = 1.
cZeros() cZeros(expression, var) Returns a list of candidate real and non-real values of var that make expression=0. cZeros() does this by computing exp8list(cSolve(expression=0,var),var). Otherwise, cZeros() is similar to zeros().
d() d(expression1, var [,order]) ⇒ expression d(list1,var [,order]) ⇒ list d(matrix1,var [,order]) ⇒ matrix Returns the first derivative of expression1 with respect to variable var. expression1 can be a list or a matrix. order, if included, must be an integer. If the order is less than zero, the result will be an anti-derivative. d() does not follow the normal evaluation mechanism of fully simplifying its arguments and then applying the function definition to these fully simplified arguments. Instead, d() performs the following steps: 1. Simplify the second argument only to the extent that it does not lead to a nonvariable. 2. Simplify the first argument only to the extent that it does recall any stored value for the variable determined by step 1. 3. Determine the symbolic derivative of the result of step 2 with respect to the variable from step 1. 4. If the variable from step 1 has a stored value or a value specified by a “with” (|) operator, substitute that value into the result from step 3.
Define Defines a program (subroutine) or function variable within a program. Creates a user-defined function. Creates funcName as a user-defined function. You then can use funcName(), just as you use built-in functions. The function evaluates expression using the supplied arguments and returns the result. funcName cannot be the name of a system variable or built-in function
DelFold Deletes user-defined folder(s) Deletes a folder. All variables in that folder must be deleted first. Example: :DelFold mfolder1,cfolder2
DelVar Deletes a variable. will zero out a value :0→A is the same as :DelVar A
det() det(squareMatrix) ⇒ expression Returns the determinant of squareMatrix. squareMatrix must be square.
diag() diag(list) ⇒ matrix diag(rowMatrix) ⇒ matrix diag(columnMatrix) ⇒ matrix Returns a matrix with the values in the argument list or matrix in its main diagonal.
Dialog Example 1: :prog4() :Prgm :Dialog : Title "Enter an integer" : Request "Integer",n :EndDlog Example 2: :Dialog : Title "The answer is" : Text string(temp) :EndDlog :EndPrgm
dim() dim(string) ⇒ integer Returns the number of characters in a string. dim(list) ⇒ integer Returns the dimension of list.
Disp Disp, short for display, prints to the screen. Displays an expression or string on the Program I/O screen. Disp can also display the current contents of the Program I/O screen without displaying additional information. Example 1: :hellowld() :Prgm :ClrIO :Disp "HELLO, WORLD!" :Pause :ClrIO :DispHome :EndPrgm Example 2: :dosum() :Prgm :ClrIO :Input "Enter 1st number",num1 :Input "Enter 2nd number",num2 :Disp num1+num2 :EndPrgm Example 3: :Diplay var1," != ",var2
DispG DispG Displays the current contents of the Graph screen.
DispHome The DispHome command returns the user to the homescreen. This is very useful in a program that uses the I/O screen since ending a program with a command like Stop will not automatically return the user to the homescreen. Example: :Prompt a :Pause :DispHome
dotP() The dotP() command is an inner product of its arguments. The inner product is defined as follows: dotP(vec1, vec2) = vec2' * vec1,
Draw Functions DrawFunc DrawInv DrawParm DrawPol DrawSlp
DropDown DropDown titleString, {item1String, item2String, ...}, varName Displays a drop-down menu with the name titleString and containing the items 1:item1String, 2:item2String, and so forth. DropDown must be within a Dialog...EndDlog block. If varName already exists and has a value within the range of items, the referenced item is displayed as the default selection. Otherwise, the menu’s first item is the default selection. When you select an item from the menu, the corresponding number of the item is stored in the variable varName. (If necessary, DropDown creates varName.)
Else This statement pairs up with 'If', 'Then', and 'EndIf' See If
ElseIf This creates an embeded If in the previous If statement. See If and Else
EndDlog Example 1: :prog4() :Prgm :Dialog : Title "Enter an integer" : Request "Integer",n :EndDlog
EndFor Ends the statements listed in the For loop see For
EndFunc
EndIf Example (multi line if with Then and EndIf): :If a=5 Then :Disp “Still With Us?” :Disp "----" :EndIf see If
EndLoop Specifies the end of the loop. Example: :0→x :Loop : Disp x : x+1→x : If x→5 : Exit :EndLoop :Disp x
EndPrgm Lets the code know we are at the end of instructions.
EndTBar EndTry
EndWhile Example: :0->x :While x<5 : Disp x : x+1->x :EndWhile :Disp x
entry()
exact() exact(expression1[,tol]) exact(list1[,tol]) exact(matrix1[,tol]) The exact() function ensures that the calculator uses the Exact mode arithmetic regardless of the Exact/Approx mode setting to return, when possible, the rational-number equivalent of the argument. Note: tol specifies the tolerance for the conversion; the default is set to 0(zero).
Exec The Exec command, which takes as its argument a string containing the hex code that would otherwise be in a normal ASM program, including the relocation table at the end (see the compiled ASM program format). Exec also takes optional parameters after the string that are passed as arguments to the program (on the expression stack like AMS does, not on the CPU stack like one might expect).
Exit Exit is used to break out of or exit a loop or condition. Not to be confused with EndPrgm Example: :0→x :Loop : Disp x : x+1→x : If x→5 : Exit :EndLoop :Disp x
expand()
expr() Converts a string into an expression and executes that expression. This is the opposite of the string command. Example: :prog1() :Prgm :Request "Enter an integer",n :expr(n)->n :0->temp :For i,1,n,1 : temp+i->temp :EndFor :Disp temp :EndPrgm
factor() factor(expression1[, var]) ⇒ expression factor(list1[,var]) ⇒ list factor(matrix1[,var]) ⇒ matrix factor(expression1) returns expression1 factored with respect to all of its variables over a common denominator. expression1 is factored as much as possible toward linear rational factors without introducing new non-real subexpressions. This alternative is appropriate if you want factorization with respect to more than one variable.
Fill Fill expression, matrixVar ⇒ matrix Replaces each element in variable matrixVar with expression. matrixVar must already exist.
floor() Returns the greatest integer that is <= the argument. This function is identical to int(). The argument can be a real or a complex number. Note: See also ceiling()
fMax() fMax(f(var),var,lo,hi[,tol]) finds the value of var between lo and hi at which the maximum of f(var) occurs. tol controls the accuracy of the maximum value computed. The default value of tol is 10-5. fMax() only works for real numbers and expressions. Example: :fMax(sin(X)cos(X),X,0,3)
fMin() fMin(f(var),var,lo,hi[,tol]) finds the value of var between lo and hi at which the minimum of f(var) occurs. tol controls the accuracy of the minimum value computed. The default value of tol is 10-5. fMin() only works for real numbers and expressions. Example: :fMin(cos(sin(X)+Xcos(X)),X,0,2)
FnOff Deselects all (or only specified) Y=functions.
FnOn Selects all (or only specified) Y=functions.
For For [var],[start],[end],[inc] Example: :For i,0,5,1 : Disp i :EndFor :Disp i Displays 0, 1, 2, 3, 4, and 5.
format() format(expression[, formatString]) ⇒ string Returns expression as a character string based on the format template. Very useful on chosing format of the number to display. Expression must simplify to a number. Examples: :format(1.234567,"f3") will return "1.235" :format(1.234567,"s2") will return "1.23í0" :format(1.234567,"e3") will return "1.235í0" :format(1.234567,"g3") will return "1.235" :format(1234.567, "g3") will return ¸"1,234.567" :format(1.234567,"g3,r:") will return "1:235"
fPart() fpart(expression1) ⇒ expression fpart(list1) ⇒ list fpart(matrix1) ⇒ matrix Returns the fractional part of the argument. For a list or matrix, returns the fractional parts of the elements. The argument can be a real or a complex number. Example: :fpart(1.234) will return ".234"
Func Required as the first statement in a multistatement function definition. Example: :Define g(xx)=Func : If xx<0 Then : Return 3ùcos(xx) : Else : Return 3ìxx : EndIf :EndFunc
gcd() Returns the greatest common divisor of the two arguments. :gcd(num1,num2) -> num3
Get Retrieves a CBL 2/CBL (Calculator-Based Laboratory) or CBR (Calculator-Based Ranger) value from the link port and stores it in variable var. Example: :Send {3,1,ë1,0} :For i,1,99 : Get data[i] : PtOn i,data[i] :EndFor
GetCalc GetCalc var Retrieves a value from the link port and stores it in variable var. This is for unit-tounit linking.
getDenom() Transforms expression1 into one having a reduced common denominator, and then returns its denominator
getFold() Returns the name of the current folder. stores value as string.
getKey() getMode() getNum()
getType() Returns a string that indicates the data type (EXPR,LIST,ect.) of a variable.
getUnits()
Goto This command will take the execution of the code to a Label. Example :x->1 :Lbl LabelA :Disp "Text at Label A" :If x->0 :Goto LabelA // this line is skipped if not true
Graph Graphs one or more specified expressions, using the current graphing mode.
identity()
If If is used to check a condition. valid If statements: Example 1: :if x>5 : Disp "x is greater than 5" Without the 'Then' only the next line is run if true Example 2: :if x=10 : Disp "x=10" With TI basic, use single = for checking equal/true. Example 3 Multi line if with Then and EndIf. :If a=5 Then : Disp “Still With Us?” : Disp "----" :EndIf Example 4: If used to break out of a loop. :0→x :Loop : Disp x : x+1→x : If x>5 : Exit :EndLoop :Disp x Example 5: with the Else statement :If x>5 Then : Disp "x is greater than 5" : 2*x→x :Else : Disp "x is less than or equal to 5" : 5*x→x :EndIf :Disp x
imag()
Input input [string],[var] Displays the Graph screen and lets the user update the variables xc and yc (rc and Oc in polar mode) by positioning the graph cursor. Example: factui() :Prgm : Local n : Define fact(x)=Func : If x=0 : Return 1 : Return x*fact(x-1) : EndFunc : Input "Input a number", num1 : Disp "n! = " : Disp fact(num1) :EndPrgm
InputStr The InputStr command allows you to input a string to a variable. Since Input doesn't support the storing of strings into variables, you have to use this command to do that. Keep in mind that the inputted variable cannot be the name of a preexisting variable or flash application that is locked, protected, or archived. For example, if you had a program named "a" or "hello", the command wouldn't work because it is already in use. Examples: :InputStr A :InputStr hello
inString() Searches a string to see if it contains a specified substring. If so, inString returns the character position where the first occurrence of the substring begins.
int() intDiv() iPart() isPrime() Item
Lbl Lbl is the label statement for the use of a placemark for the Goto command.
lcm()
left() Returns a specified number of characters from the left side (beginning) of a string.
limit()
Line Line x1,y1,x2,y2
LineHorz LineTan LineVert LinReg ln() LnReg
Local Declares one or more variables as local variables.
Lock Loacks a variable so that it cannot be accidentally changed or deleted without first being unlocked.
log() Logistic
Loop specifies the start of a loop. Example: :0→x :Loop : Disp x : x+1→x : If x→5 : Exit :EndLoop :Disp x
LU
max() mean() median() MedMed
mid() Returns a specified number of characters from any position within a string.
min() mod()
MoveVar Moves a variable from one folder to another.
mRow() mRowAdd()
nCr() nDeriv()
NewData Creates a data variable whose columns consist of a series of specified lists.
NewFold Creates a new folder.
newList()
newMat()
NewPic Creates a graph picture variable based on a matrix.
NewPlot Creates a new stat plot definition
NewProb
nInt()
norm()
not
nPr()
nSolve()
OneVar or
ord() Returns the character code of the first character within a string. This is the opposite of the char command. see char
Output Displays an expression or string starting at specified coordinates on the Program I/O screen. Example: :randseed(1147) :ClrIO :For i,1,100,10 : Output i, rand(200),"Hello" :EndFor
part() PassErr
Pause Pauses the execution of the code. The command waits for "enter" to be pressed. Example: :hellowld() :Prgm :ClrIO :Disp "HELLO, WORLD!" :Pause :ClrIO :DispHome :EndPrgm
PlotsOff Deselects all (or only specified) stat data plots.
PlotsOn Selects all (or only specified stat data plots.
polyEval() PopUp PowerReg
Prgm Instructions should be between Prgm and EndPrgm
product() Prompt propFrac() PtChg PtOff
PtOn Example: :Send {3,1,ë1,0} :For i,1,99 : Get data[i] : PtOn i,data[i] :EndFor
ptTest() PtText PxlChg PxlCrcl PxlHorz
PxlLine PxlLine row1,col1,row2,col2
PxlOff PxlOn pxlTest() PxlText PxlVert
QR QuadReg QuartReg
rand() Create a random number. Example: :rand(10)→dcard1 will create a random integer between 1 and 10 and store in variable called dcard1
randMat() randNorm() randPoly() RandSeed
RclGDB Restores all settings stored in a graph database.
RclPic Clears the Graph screen and displays a stored graph picture.
real() ref() remain()
Rename Renames a variable.
Request Example: :prog1() :Prgm :Request "Enter an integer",n :expr(n)->n :0->temp :For i,1,n,1 : temp+i->temp :EndFor :Disp temp :EndPrgm
Return
right() Returns a specified number of characters from the right side (end) of a string.
rotate()
round()
rowAdd() rowDim() rowNorm() rowSwap()
RplcPic
rref()
Send
SendCalc Flash SendChat
seq()
setFold()
setGraph() Changes settings for the various graph formats. (Coordinates, Graph Order, etc.)
setMode() Sets the Graph mode, as well as other modes.
setTable() setUnits()
Shade
shift()
ShowStat sign() simult()
sin() sinֿ¹() sinh() sinhֿ¹()
SinReg solve()
SortA SortD
stdDev()
StoGDB Stores the current graph settings to a graph database variable.
Stop
StoPic Copies the Graph screen (or a specified rectangular portion) to a graph picture variable.
string() Converts a numeric expression into a string. This is the opposite of the expr command. see expr
Style Sets the display style for a function.
subMat()
sum()
switch()
Table tan()
tanh()
taylor() tCollect() tExpand() Text Then Title tmpCnv()
ToolBar
Trace Lets a program trace a graph.
Try TwoVar
Unarchiv Flash unitV()
Unlock Unlocks a locked variable. see lock.
variance()
when()
While Example: :0->x :While x<5 : Disp x : x+1->x :EndWhile :Disp x
xor
XorPic Displays the Graph screen and superimposes a stored graph picture by using XOR logic.
zeros()