Base-n Converter

Blitz3D Forums/Blitz3D Programming/Base-n Converter

Techlord(Posted 2007) [#1]
I've searched the Code Archives for Base-n Converter (ie: Base-36 to Decimal, visa versa) with no luck. Does anyone know where to find one, have some code?

Otherwise I will code one and put it into the archives.


_33(Posted 2007) [#2]
Why don't you use Mod instruction?

value% Mod 36 for example will gladly replicate what you're asking for.


Techlord(Posted 2007) [#3]
Im using the Base36 (Sexatrigesimal ) instead of Base16 Hexidecimal. It produces numerical values with 0-9,A-Z. Just want to save myself a little if time, if a converter is available.


_33(Posted 2007) [#4]
hmm I see. Is that for encryption? :P


Techlord(Posted 2007) [#5]
It can be used for encryption or compression. Yoohooo!! I found a base converter in the archives -- http://www.blitzbasic.com/codearcs/codearcs.php?code=1972