From: Johan Knol <johan.knol@id...> - 2001-06-05 15:27:32
> The code
> you suggested still only processes the least significant digit (hex,
> decimal, or whatever base defined by radix) of the present value of
Here is where you are mistaken again, notice the do-while loop:
something with the least significant radix digit;
lval /= radix; // skip the least significant digit
} while (lval);
In the loop we only process the least significant digit but in the next
itteration the next significant digit will be processed until we are done.
> Final thought - since we are discussing an 8-bit machine, somewhere,
> sometime you will reach a point where you cannot count higher than 255
> and a byte today has not changed much from what it was a zillion years
:) I won't be sarcastic, although I know I am. If I had children, I would
start teaching them to count using there 10 fingers (1 byte). If they grow
beyond that, I would suggest they use their toes as well (two bytes). If
they grow beyond that, I think they are ready for a floating point
calculator and I would bail out.
Get latest updates about Open Source Projects, Conferences and News.