Re: TIB: Need help with Chemistry program I made
[Prev][Next][Index][Thread]
Re: TIB: Need help with Chemistry program I made
The trick to speed it up is to divide the 109 if/then/end statements into
smaller groups.
Like this:
If a < 10
then
if a = 1
then
...
end
if a = 2
then
...
end
...
...
...
...
...
end
if a < 20
then
if a = 20
then
...
end
...
...
...
...
...
end
if a = 30
..
..
...
...
and so forth, if you understand. This way it only goes thru 10-20 if/then
statements instead of going through 110 or whatever. Try experimenting with
different incrementations (in my example it's 10, I think 20 might be a
little better, but maybe 5 is faster). I did something like this for
TextEdit for the TI-82 (available at ticalc.org). It used getkey and had to
check for each letter, it was ridiculously slow before I thought of this
because it had to check for about 50 possibilities and respond fast. It
wasn't quite as fast as I would have liked but better.
Philipp Keller
>
>It it simple, it shows a few pictures persay, asks for any Atomic Number,
>compares it to every number until it finds a true statement and I used a
GOTO
>command to take it to a lbl on down. It's like that for all 109 elements.
>The big loop is a goto command at the end to a menu that let's you start
over
>or quit.
>