EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

Texas Instruments TI-89 Tip List

Texas Instruments TI-89
507 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #295 background imageLoading...
Page #295 background image
In many cases, the problem can be avoided by just keeping a copy of B() in the same folder as A(),
and using method 1 above. This approach has these disadvantages:
! If B() is used my many programs, in many different folders, RAM or archive is wasted with each
copy that is necessary.
! If changes are made to B(), you need to make sure that all of the copies are updated.
There is no clear solution to this problem. You need to weigh the advantages and disadvantages of
each method. Most programmers use method 2, in spite of its disadvantages.
[7.6] Recursion limits
The 89/92+ support recursion, whichmeans that a function can call itself. Since the operating system
must save the state information of the calling program, there is a limit to the depth to which recursion
can be used. I used this test routine to determine the maximum recursion calling depth:
rectest(k)
func
when(k=0,k,rectest(k-1))
endfunc
This program simply calls itself repeatedly, decrementing the k variable, until k = 0.
The program runs correctly for values of k of 41 or less. When k is 42 or greater, the program fails with
a "Memory" error message. This limit does not seem to be sensitive to the amount of RAM and archive
used. I did my testing with a TI-92 Plus, AMS version 2.05.
[7.7] Use return instead of stop in programs for better flexibility, and to avoid a crash
Note: this bug has been fixed in AMS 2.05. stop now works correctly in archived programs
The stop instruction stops program execution. The return instruction, used without an argument, also
effectively stops program execution. It is better to use return instead of stop for two reasons. First, it
makes your programs more flexible. Second, under certain circumstances, stop can cause a crash that
can be fixed only by resetting the calculator.
The improved flexibility comes about if you call one program from another program. For example,
suppose you wrote a program called app1() which does something useful. Later, you decide it would
be helpful to call app1() from another program. If you use stop in app1(), execution stops when app1()
is finished, when you really want to return to the calling application.
Further, using stop instead of return can cause a calculator crash. The effect of this bug is to lock up
the TI92 so that it does not handle keypresses and must be reset. I have only verified this bug on my
TI92 with the Plus module installed, ROM version 1.05.
The bug occurs when an archived program containing the stop instruction is executed with the expr()
instruction. To duplicate the bug, create this program in the \main folder:
stopit()
prgm
7 - 6

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals