;base->B
;Ans is the string to convert
sum(seq(B^(length(Ans)-A)inString("123456789ABCDEF",sub(Ans,A,1)),A,1,length(Ans
This code is smaller than the method using For() but I haven't tested it speed wise.
EDIT: I have made this routine smaller. I did this a while back and posted it on Cemetech just forgot to cross-post it.