Misc.

A. Linking

Linking is a fairly simple matter. SENDCALC var,var,... and GETCALC var,var... are used for transmitting from one calculator to another. In the case of sending from a TI-89 to a TI-92 or vice-versa, use SENDCHAT and GETCHAT. The send commands will give up after a short time and error if no calculator is ready to receive, so put it in a TRY block. The get commands will wait indefinitely and can only be stopped by pressing on and breaking the program. IMPORTANT: SEND and GET are for Calculator Based Laboratories. Do not use them to transmit from calculator to calculator.

B. Indirection and Expr

Use indirection (# string) to get the value of the variable with the name that is the string. TIP: Use Indirection to recall pictures or player data in games. For example, you could store player 1's stats in play1 and player 2's stats in play2. Then if P was the player whose turn it is, you could use #("play"&string(P)) to recall the appropriate stats.

Expr string executes what is contained in the string. Use it to execute a string you have parsed together.

C. Modes

Use the following to change modes:

Setgraph(mode,setting)
ModeSetting
"Coordinates""Rect","Polar","Off"
"Graph Order""Seq","Simul"
"Grid""Off","On"
"Axes""Off","On" (in any mode other than 3D) "Off","Axes","Box" (in 3D)
"Leading Cursor""Off","On"
"Labels""Off","On"
"Style""Wire Frame","Hidden Surface","Contour Levels","Wire and Contour","Implicit Plot"
"Seq Axes""Time","Web","U1-vs-U2"
"DE Axes""Time","t-vs-y'","y-vs-y'","y1-vs-y2","y1-vs-v2'","y1'-vs-y2"
"Solution Methos""RK","Euler"
"Fields""SlpFld","DirFld","FldOff"


Setmode(mode,setting)
ModeSetting
"Graph""Function","Parametric","Polar","Sequence","3D","Diff Equations"
"Display Digits""Fix 0",..."Fix 12","Float","Float 1",..."Float 12"
"Angle""Radians","Degree"
"Exponential Format""Normal","Scientific","Engineering"
"Complex Format""Real","Rectangular","Polar"
"Vector Format""Rectangular","Cylindrical","Spherical"
"Pretty Print""Off","On"
"Split Screen""Full","Top-Bottom","Left-Right"
"Split 1 App""Home","Y= Editor","Window Editor","Graph","Table","Data/Matrix Editor","Program Editor","Text Editor","Numeric Solver"/td>
"Split 2 App""Home","Y= Editor","Window Editor","Graph","Table","Data/Matrix Editor","Program Editor","Text Editor","Numeric Solver"
"Number of Graphs""1","2"
"Graph2""Function","Parametric","Polar","Sequence","3D","Diff Equations"
"Exact/Approx""Auto","Exact","Approximate"
"Base""Dec","Hex","Bin"


SetTable(mode,settings)
modeSettings
"Graph <-> Table""Off","On"
"Independent""Auto","Ask"


SetUnits(list)
Listexplanation
{"SI"}SI units
{"ENG/US"}US units
{"Custom","cat","unit"}Custom - any set of category and unit as seen in Unit menu (2nd then 3)


D. The GET functions

These functions get information about the current settings
CommandExplanation
GetConfg()Element 22 is the amount of free ram, 26 is the amount of free archive
Getfold()Current Folder
Getmode(mode)Mode can be "Graph","Display Digits","Angle","Exponential Format","Complex Format","Vector Format","Pretty Print","Split Screen","Split 1 App","Split 2 App","Number of Graphs","Graph 2","Exact/Approx","Base", or "All"
Gettype(var)Returns type of var. TIP: Use GETTYPE to check for validity of saved games.
Getunits()Returns current unit settings


E. The Exec command

EXEC string[,argu][,argu] executes a Motorola 68000 op code (a form of asm). The only ones worth the trouble are power down ("4E444E75000") and reset ("4E424E75000"). An incorrect code, or one that cannot be used under the present circumstances will crash your calculator. If you want some more information, check on TI's web site (www.ti.com) or download Compiler from www.ticalc.org. It's a little buggy, but it compiles asm using the EXEC command.

F. Other commands

CommandExplanation
Char(expr)Outputs a one character string that corresponds with the integer used as an argument. Think of it as TI's ASCII code. TIP: Some GETKEY values correspond with CHAR values. Use TRY:CHAR(GETKEY()):ELSE:ENDTRY to get appropriate strings. Ex. If Shift 5 was pressed, CHAR(GETKEY()) would return "M". You must use this in a TRY block because not all GETKEY values (such as 0) have CHAR values. See ORD
Define var(arg...)=exprDefines a variable. Use it to generate functions and programs from within a program.
DispGDisplays the graph screen.
DispHomeDisplays the home screen. TIP: Put it at the end of your programs.
ExitExits the current FOR, LOOP, or WHILE block. Important: Be careful in nested loops.
Ord(string)Returns the integer corresponding to the first character in the string. See CHAR.
Part(expr[,expr])Use PART to parse equations. See your manual for more. Rarely used, but extremely helpful in complex math programs.
PtTest(x,y)Tests if the pixel corresponding to the point is on (true) or off (false)
PxlText(row,col)Tests if the pixel is on (true) or off (false)
Pause [expr]Waits until enter is pressed
Rand [int]Generates a random integer between 0 and the argument or a decimal between 0 and 1 is no argument is specified


Congratulations, you've finished. Following are sample routines for some common tasks. See if you can figure out how they work.
<<Previous - Contents - Next>>