i wrote this recently, figured i'de post it here:
function hextodec(string$)
string$=lower$(string$)
for x=0 to len(string$)-1
select mid$(string$,len(string$)-x)
case "1"
inc decimal,1*16^x
endcase
case "2"
inc decimal,2*16^x
endcase
case "3"
inc decimal,3*16^x
endcase
case "4"
inc decimal,4*16^x
endcase
case "5"
inc decimal,5*16^x
endcase
case "6"
inc decimal,6*16^x
endcase
case "7"
inc decimal,7*16^x
endcase
case "8"
inc decimal,8*16^x
endcase
case "9"
inc decimal,9*16^x
endcase
case "a"
inc decimal,10*16^x
endcase
case "b"
inc decimal,11*16^x
endcase
case "c"
inc decimal,12*16^x
endcase
case "d"
inc decimal,13*16^x
endcase
case "e"
inc decimal,14*16^x
endcase
case "f"
inc decimal,15*16^x
endcase
endselect
next x
endfunction decimal
"Genius is 1% inspiration and 99% perspiration"