i found a new trick in basic that saves about five bytes and some time. in stead of doing this:


Code:

:ClrDraw
:5→A
:Text(0,0,"TEST:
:Text(0,20,A
:Pause
:ClrHome
:DelVar ADelVar Y


You can do this:


Code:

:ClrDraw
:5→A
:Text(0,0,"TEST: ",A
:Pause
:ClrHome
:DelVar ADelVar Y
lafferjm wrote:
i found a new trick in basic that saves about five bytes and some time. in stead of doing this:


Code:

:ClrDraw
:5→A
:Text(0,0,"TEST:
:Text(0,20,A
:Pause
:ClrHome
:DelVar ADelVar Y


You can do this:


Code:

:ClrDraw
:5→A
:Text(0,0,"TEST: ",A
:Pause
:ClrHome
:DelVar ADelVar Y


*bangs head on table* When you said new optimization trick I thought you actually had something that we did not know. Oh well, good job for discovering it on your own.
good investigative work lafferjm, thats the best way to learn somthing
true, good job finding it, though I have used it before (that, and things are a tad bit more dynamic)/.
I do this whenever I need it. I'm not so sure you discovered it on your own though. It is in the manual after all.
i thought it was new because i hadnt seen it in any optimization guides. and i discovered it on accident.
Why would they put it in an optimization guide if it's already in the manual? Laughing
oy, no picking him, its great that he discovered this on his own.
Harq wrote:

*bangs head on table*

There's room on your table to bang your head on? I'd end up hitting either my keyboard, one of the monitors, a stack or CDs, or my computer.
The Tari wrote:
Harq wrote:

*bangs head on table*

There's room on your table to bang your head on? I'd end up hitting either my keyboard, one of the monitors, a stack or CDs, or my computer.


Correction

*Bangs head on pile of papers that I am using to write me essays that are sitting on my table that is sitting on the floor which is attached to the house which is firmly planted onto the earth which is composed of...*
One of my favorite things to do with that trick is display fractions:

Code:
:Text(0,0,A,"/",B

No big "log(" algorithms to figure out how long A and B are. Smile


256 posts! I have exited out of the land of 8 bits!
Mmm, old news. But good job with this stuff, calc84 and lafferjm.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement