You may use this function:
function hex2dec(h ,i,x,v){
h=tolower(h);sub(/^0x/,"",h)
for(i=1;i<=length(h);++i){
x=index("0123456789abcdef",substr(h,i,1))
if(!x)return"NaN"
v=(16*v)+x-1
}
return v
}
Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886