Texas Instruments TI-89 Tip List page 296

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

stop
endprgm
Archive stopit(), then, at the command line, enter
expr("stopit()") [ENTER]
The BUSY annunciator in the LCD turns on and does not turn off. Keys seem to be recognized, but not
handled. For example, pressing [green diamond] will toggle the 'diamond' annunciator, and pressing
[2nd] will toggle the '2nd' annunciator. However, neither [green diamond][ON] nor [2nd][ON] will turn
the calculator off. Pressing [ON] to break the program doesn't work, either. The calculator must be
reset with [2nd][hand] + [ON].
This bug does not occur if return is used instead of stop.
The bug also occurs if expr() is used in a program, to execute the archived program containing the
stop instruction. For example, this program
stoptry()
prgm
expr("stopit()")
endprgm
will also cause the bug, but only if stopit() is archived.
The bug will not occur if the program containing the stop instruction is not archived.
Note that the bug also occurs if stopit() is called indirectly using expr(), like this:
app1()
prgm
expr("stoptry()")
endprgm
stoptry()
prgm
stopit()
endprgm
stopit()
prgm
stop
endprgm
In this case, app1() is not archived, but stoptry() and stopit() are archived, and the bug occurs. And, in
this case, stopit() is not called with expr(), but the routine that calls stopit() does use expr().
This bug is annoying because it can prevent you from implementing desired program operation. I have
a complex application that uses an 'exit' program to clean up before the user quits the program.
Clean-up includes deleting global variables, resetting the user's mode settings, and restoring the
current folder at the time the application was called. This 'exit' routine is called from the application
mainline, so I would like to use the stop instruction to terminate operation. There are several obvious
solutions:
1. Leave the 'exit' routine unarchived. This consumes RAM for which I have better uses.
7 - 7

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92+

Table of Contents