Hey, reuse the single $ in the second part ?

code:
Function BaseConverter($v,$f,$t)
$i = len($v)
$=1.
Do
$x = substr($v,$i,1)
if $x > 9
$x = ASC(ucase($x)) - 55
endif
$n=$*$x+$n
$=$*$f
$i=$i-1
Until $i=0

$c=""
While $n
$ = INT($n - (INT($n/$t) * $t))
$n = ($n-$)/$t
IF $ > 9
$ = CHR($ + 55)
ENDIF
$c = ""+$+"$c"
Loop
$BaseConverter = $c
Endfunction
;!
BaseConverter('44680832201',10,36) ?
BaseConverter('52',10,2) ?
BaseConverter('Kixtart',36,10) ?

242

plus, this:

$c = ""+$+$c

might shave two more ? haven't tested too fully.

[ 11 June 2002, 06:01: Message edited by: Shawn ]