Critique a function to convert time, please
On Fri, 30 Apr 2010 07:28:06 -0700, Gary Brown
<junk_at_kinneson_dot_com wrote:
Looks fine.
You could use Select Case to make it a little more readable but your
function is AOK.
I thought about that, but couldn't figure out a way to make it work.
One problem is that the compare operands keep changing.
Another is that the units conversions are progressive. I would have to
do 1 division in case 1, 2 in case 2, etc. I thought my way was more
efficient, if a few more lines of code.
If there were 50 tests, I'd put it all in an array and use a loop.
Thanks
|