Convert numerals
Luciano wrote:
I have tested for several number sizes and bases but the unique problem
is that in spite of a base like 2 has only two notations (0,1) the
function calculate a "possible" corresponding decimal if we type
something that is not inside theses possible notations (e.g. if we type
22 in binary to decimal it calculates the number 6).
(For others reading, he's referring to my fromBaseToDec function.)
You could make sure your inputs have the correct numerals in them before
passing them to my function.
Or, you can add this line right below the "Error 13" line:
If chk base Then Error 9: Exit Function
Error 9 is "Subscript out of range".
--
You're beginning to make sense. It's scaring me.
|