Convert Base 36 to base 10
David wrote:
Guys thanks for this-
I have tried the code what I get is for a sample code
O81D8KEURD94I = #value
but
081d8ke = 486026654
Is there any length critera in the function- couldn't spot any
Yes. Implicit in the declaration of Long values -2^31 < x <= 2^31-1
You have to explicitly implement some form of long integer arithmetic to
handle values which go outside this boundary.
Decimal 2146483647 is the largest Long value which in Base36 = ZIK0ZJ
(subject to typos)
You could cut the string into two parts and pray that the leading digit
is always zero. Unsigned integers can handle 6 base36 digits OK.
The mantissa of Double precision reals would let you do up to 9 digits
of Base36.
Regards,
Martin Brown
|