#: 5087 S15/Hot Topics
11-Jul-90 17:05:35
Sb: #5078-Is Basic out of date?
Fm: Kevin Darling (UG Pres) 76703,4227
To: Jim Williams 72157,3524
Eet -
Yeah, well, C64 programs were never known for their readability .
Agree, comments make good sense on both Basic/C programs... and the use of good
variable names. Anytime a programmer drops back to using "i,j,x" for every
variable, he's writing hard-to-read code ;-).
I think you'd find that most Basic09 source code is commented (and has good
variable names) just as well as most C source code is.
The big diff to me is that development is faster using an interactively
semi-compiled language such as Basic09... you can try stuff out quicker. For
instance, when debugging the circle algorithm for the gfx driver, I first wrote
it up in Basic using integer math. I could quickly (very!) try out different
changes until it worked perfectly. Then the translation from Basic into 68K asm
was a piece of cake. Really. Sort of like:
move.w ycord(a2),d1
REPEAT Loop: move.w foo,d0
xcord = foo * ratio mulu.w ratio(a2),d0
run Plot(xcord,ycord) bsr Plot
UNTIL ycord = 0 tst.w d1
bne.s Loop
I guess I'm acting the part of a C compiler, except my code will be smaller
;-). So for quick utils at least, I still write in Basic. I can mess around
until it works right, and without fear of crashing the machine with stray
pointers . Granted, if I were more adept at C, I'd probably zing out
utils in it, instead. - kev
|