[TI BASIC] Optimizing

Got questions? Got answers? Go here for both.

Moderator: MaxCoderz Staff

tribal
New Member
Posts: 5
Joined: Mon 28 Apr, 2008 8:53 pm
Location: anywhere, everywhere

Re: [TI BASIC] Optimizing

Post by tribal »

Instead of using:

Code: Select all

if ans != 0 and ans !=21
use:

Code: Select all

if prod(Ans != {0, 21
and if you are ever checking if Ans is holding 0 I would suggest using:

Code: Select all

if not(Ans
instead of:

Code: Select all

if Ans = 0
both are equivalent but the first is smaller.
User avatar
waeV
New Member
Posts: 74
Joined: Wed 23 Apr, 2008 12:52 am
Location: Maine

Re: [TI BASIC] Optimizing

Post by waeV »

if not(ans you say? Hmm... I guess I would find that in the catalog? I don't see not( anywhere else.
My ethicator machine must have had a built-in moral compromise spectral release phantasmatron! I'm a genius!
Image
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Re: [TI BASIC] Optimizing

Post by King Harold »

[2ND] [TEST] LOGIC [4]

Of course it's also in the Catalog
Post Reply