hmm...
today, it works fine again
Code:

function bta($b, $c)
dim $,$x
if $c
for $=-729 to -$
$x=$x+$*($b=bta($,0))+$*($c=bta($,0))
next
$bta=bta($x,0)
else
do
$=$b mod 3
$bta=""+($-$/2*3)+$bta
$b=($b+$/2)/3
until $b=0
endif
endfunction

_________________________
!

download KiXnet