A couple of TI-89 programming questions


[Prev][Next][Index][Thread]

A couple of TI-89 programming questions



I've been working on a set of routines to implement an "automatic ant"
cellular atomaton.
Got it working pretty well now, but some questions have come up that I
would be interested
in getting answered. Maybe someone on the list can help.

1. I built in error-trapping (the "Try" command structure) to allow the
program to exit gracefully
when the ant eventually reaches the edge of the screen. I am also using
getKey() to watch for
any keypresses, to allow the user to stop the program at any point (and
also exit gracefully),
because watching that ant crawl around does get a bit boring pretty
quickly. But I cannot seem to
trap the situation of the user pressing the "On" key, even though there
is a specific error number
(200) for the Break error caused by pressing "On". Anyone know how to do
this?

I should add here [applying to all of the questions] that I know this
sort of thing can be done in
assembly. I am not really interested in this route, however, and would
like to know just what the
limitations are with respect to the built-in TI-89 programming language
(which some, rightly or
wrongly, refer to as Basic).

2. The manual says that an Automatic Power Down (APD) does not happen
"if a calculation or program is in progress", but it sure looks like
this is what happens after the ant crawls around for
five minutes or so. Pressing "On" gets things going again, but there is
no way to just walk away
and leave the thing running to see what happens eventually. Suggestions?

3. The reason for wanting to exit gracefully is to be able to restore
the original settings for the
graph screen. Before setting up the screen for the "anthill", I need to
turn off Axes, Labels, and
Grid, and I then want to restore the user's settings when the ant
business is finished. These settings are saved in a local variable, in
order to avoid cluttering up the workspace. But then, if the program is
interrupted by pressing the "On" key the original settings are lost.
Perhaps someone has an alternative strategy for avoiding this situation
(if it does prove to be impossible to trap a Break).

Thanks for any ideas.

RWW Taylor
National Technical Institute for the Deaf
Rochester Institute of Technology
Rochester NY 14623

>>>> The plural of mongoose begins with p. <<<<