11-21-2004, 07:23 AM
Quote:Erm... the code looks functional, but there are still some things that could be improvedNeo,
#1. I don't like my program to quit when I run your function (d'oh )
#2. It can be made much faster if you use integers.
Moneo, Meg, add comments if you wish
"... the code looks functional" --- you're being so kind.
About #2 above: Speed is really not an issue, but it is nice to write the speediest code you can, just as a matter of habit.
The same applies to writing tight, straight-line code with as few if's as possible. The more code your program has, and especially the more if's, then the more chances of bugs. Just like our friend DarkNinja's code; his enhanced leap year logic has so many if's, that I don't even want to bother checking it.
*****