Author Topic: 100 TI-BASIC Optimizing Tips  (Read 9326 times)

0 Members and 1 Guest are viewing this topic.

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: 100 TI-BASIC Optimizing Tips
« Reply #15 on: December 29, 2011, 06:41:37 pm »
You don't need the Else there. ;)
yes you do.... otherwise no matter what X would be 1 by the end.
Oh. I see your point there. :P
Gotta fix it XP
Sig wipe!

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: 100 TI-BASIC Optimizing Tips
« Reply #16 on: December 29, 2011, 06:43:04 pm »
Code: [Select]
:Disp "Blah"
:Disp "More Blah"
optimized:
Code: [Select]
:Disp "Blah","More Blah
Don't
Code: [Select]
:Disp "Blah
:Disp "More Blah
takes less space?

No, it takes the same amount of space. You still have a line return there.
There's something about Tuesday...


Pushpins 'n' stuff...


Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: 100 TI-BASIC Optimizing Tips
« Reply #17 on: December 29, 2011, 06:45:50 pm »
Fine then.
Code: [Select]
:Disp "BLAH
:Disp "MORE BLAH

Optimized 9 bytes :P
Sig wipe!

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: 100 TI-BASIC Optimizing Tips
« Reply #18 on: December 29, 2011, 06:47:21 pm »
X/100 to sub(X is a very useful one.
Might as well do .1X since sub() is a 2 byte token :P
That divides by ten, not 100.
Oh right! XD Didn't see that there

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: 100 TI-BASIC Optimizing Tips
« Reply #19 on: December 29, 2011, 07:05:05 pm »
Code: [Select]
input A
if A=5
goto AA
if A!=5 (!= has to be the not equal to sign)
goto BB
lbl AA
disp A
lbl BB
output(5,5,A
to
Code: [Select]
input A
if A=5
goto AA
output(5,5,A
lbl AA
disp A

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: 100 TI-BASIC Optimizing Tips
« Reply #20 on: December 29, 2011, 07:07:30 pm »
Code: [Select]
input A
if A!=5
Output(5,5,A
Disp A
Sig wipe!

Offline chattahippie

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +27/-0
  • Super Member! :D
    • View Profile
Re: 100 TI-BASIC Optimizing Tips
« Reply #21 on: December 29, 2011, 09:31:14 pm »
Code: [Select]
If (A=1)+(A=2)+(A=3)+(A=4)to
Code: [Select]
If sum(A={1,2,3,4