[stella] A warning to newbies -- every cycle becomes sacred!

Subject: [stella] A warning to newbies -- every cycle becomes sacred!
From: RUFFIN BAILEY <rufbo1@xxxxxxxxxxx>
Date: Tue, 06 May 2003 10:00:59 -0400
For newbies that haven't written a line of 2600 asm (not that that puts
you that far behind me), be careful!  After you've started counting
cycles and working with 128 bytes of RAM, it's hard to go back "to real
life".

Just today I found myself commenting somebody else's code and seeing
this line of VB6 over and over in a particular function:

If Err.Number <> 0 Then Err.Clear

Hrm.  If err.number isn't 0, make it 0.  Couldn't you save cycles -- and
make things easier to count -- by just err.clear-ing each time without
the if-check?  Aren't cycles sacred too?  And then the big question has
to come up, "Are cycles more sacred than bits?"

Of course I think Err.Clear-ing each time makes for easier to read code
as well, and a simple "On Error Resume Next" followed by a single
Err.Clear at the end with a restart of error handling (in this case, it
factors to the same thing) is best, but I'm overly anal when it comes to
this sort of thing.

Thanks so much, Stella.  ;^)

Ruffin Bailey

----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread