OK.. this is with error correction/detection.. can anyone do better (or find bugs if there are any? (probably... this is first try).

code:
Function BaseConverter($v,$f,$t)
$t=INT($t)
$f=INT($f)
$e = ($f>36)|($t>36)|($f<2)|($t<2)
$=0
$y=1.
for $n=len($v) to 1 step -1
$x = ASC(UCASE(substr($v,$n,1)))
$z = ($x - 48 - ($x > 64) * 7)
IF ($Z<0)|(($x>57)&($X<65))|$e|($Z>($f-1))
EXIT 1
ENDIF
$=$y * $z +$

$y=$y*$f
next
$n=""
While $
$x = INT($ - (INT($/$t) * $t))
$ = ($-$x)/$t
$n = CHR($x + 48 + ($x > 9) * 7) + $n
Loop
$BaseConverter = $n
Endfunction

KixGolf score = 336

Brian

[ 12 June 2002, 17:18: Message edited by: BrianTX ]