Just a little optimization thing
Forum » Programming Help / TI-83 Programming » Just a little optimization thing
Started by: _Abe__Abe_
On: 1247006894|%e %b %Y, %H:%M %Z|agohover
Number of posts: 4
rss icon RSS: New posts
Just a little optimization thing
_Abe__Abe_ 1247006894|%e %b %Y, %H:%M %Z|agohover

In retrospect, this seems pretty obvious, but you can shave off a byte or two in some cases. I didn't realize that it could work this way at first because ti-basic wasn't my first programming language and is the only one I've ever used in which ending parentheses can be left off.

When you want to check if a list or matrix item is equal to a value, you can switch the item to the right of the = operator and remove the ending parentheses and brackets.

For example,
If [A](1,2)=2
can be
If 2=[A](1,2

I'm not sure if this is documented somewhere on this site but I don't recall seeing it here.

unfold Just a little optimization thing by _Abe__Abe_, 1247006894|%e %b %Y, %H:%M %Z|agohover
Re: Just a little optimization thing
graphmasturgraphmastur 1247007733|%e %b %Y, %H:%M %Z|agohover

That is because all parentheses and stuff like that are cut off after the 3F character, so it works like that.


"But sanctify the Lord God in your hearts, and always be ready to give a defense to everyone who asks you a reason for the hope that is in you, with meekness and fear;" ~ 1 Peter 3:16

unfold Re: Just a little optimization thing by graphmasturgraphmastur, 1247007733|%e %b %Y, %H:%M %Z|agohover
Re: Just a little optimization thing
DarkerLineDarkerLine 1247013540|%e %b %Y, %H:%M %Z|agohover

If you check the optimization page, this is mentioned as part of the basic techniques. It works for ending parentheses, quotes, and brackets before →, as well. And for ending parentheses and brackets (but not quotes) before a : character that isn't a new line.

unfold Re: Just a little optimization thing by DarkerLineDarkerLine, 1247013540|%e %b %Y, %H:%M %Z|agohover
Re: Just a little optimization thing
_Abe__Abe_ 1247077368|%e %b %Y, %H:%M %Z|agohover

Oh. Yeah, I missed that.
My bad.

unfold Re: Just a little optimization thing by _Abe__Abe_, 1247077368|%e %b %Y, %H:%M %Z|agohover
New post