stores the values 3 and 4 to variables x and y, respectively. This doesn't save any keystrokes, but if
you find yourself repeating the same sequence of commands, it can save time, as well as lines in the
history display. Note that only the answer of the last command is shown in the history display. In the
example above, 4 is shown.
You can also use this feature to write small programs on the command line. This contrived example
shows a loop which creates a list of values:
For k,1,10:sin(k)→l[k]:EndFor:delvar k:l
Actually, it is easier to use the seq() function for this, but the example shows the basic idea. The loop
creates a list of sin(x) for x from 1 to 10. The list is shown in the history display by the last l in the entry
line. The global variable k is deleted with the command delvar k.
As a final example, suppose that you have a several sets of data, and you want to find the minimum
and maximum residuals that result from fitting a straight-line regression to the data sets. If the data is
saved in lists a and b, this entry-line sequence finds the results:
linreg a,b:regeq(a)-b→t:{min(t),max(t)}
For each regression, store the x- and y-data to lists a and b, then use the [UP] and [ENTER] keys to
paste the expression to the entry line and execute it. Alternatively, you can use [2nd] [ENTRY] to
choose and paste the expression.
For expressions which generate large results on the history display, you can terminate the command
with :0, then only 0 will be displayed. For example, to suppress the display of the 10 x 10 matrix
created with newMat(), use
newMat(10,10):0
[9.19] Use a more efficient RPN interface
The algebraic interface used on the TI-89/92+ is only one possible interface. One alternative is called
RPN, which is an acronym for Reverse Polish Notation. RPN is popular with some users (including me)
because it is more keystroke efficient than algebraic entry, and no parentheses are used. RPN is the
method historically used on Hewlett-Packard calculators such as the HP-48 and many others. Lars
Frederiksen has written a thorough RPN interface for the TI-89/92+ calculators.
RPN may seem foreign if you have never used it, but most people can use it effectively within about
thirty minutes or so. In addition, most RPN users soon prefer it over algebraic entry. A typical RPN
screen looks like this:
While this looks like the history display of the usual algebraic entry method, it actually shows the RPN
stack. A stack is a data structure in which elements are pushed on from the bottom, and functions
9 - 23