Re: TIB: TI-82 Basic


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

Re: TIB: TI-82 Basic



On Fri, 28 Nov 1997 23:05:00 EST minman@juno.com writes:
>
>	Without a doubt, the statement that slows
>down my TI-82 Basic programs the most is the "If"
>statement.  I was wondering if any of you have any
>good ideas as to how to shorten, bypass, or not use
>the "If" statement to accomplish the desired effect.

Yes, but it kind of depends upon the case.  I will give an example that
you may be able to apply:

:If X>=0
:1->Y
:If X>=1
:2->Y
:If X>=2
:5->Y
:If X>=3
:6->Y
:If X>=4
:9->Y

Can be simplified to:

:(X>=0)+(X>=1)+3(X>=2)+(X>=3)+3(X>=4 -> Y
[The last parenthesis can be left (^^^) off to save space]

There is a better method than doing it this way.  This is just to serve
as an example to how something can be done.  If you would like I could
take a look at your source and I may be able to come up with something
better to help you.  Like I said, it depends on the individual case as to
how I would actually restructure code.
I hope that I have been of help to you.


Sincerely,
The Unibomer

Jared Ivey
Unibomer@Juno.com
http://www.geocities.com/SiliconValley/Vista/7342

"Economists are people who work with numbers but don't have the
personality to be accountants." -- Unknown


References: