> Can anybody give me a tip, how I can transform hexadecimal to decimal. > (the inverse is easy. There is the command hex$(x).) I presume that you mean converting hexadecimal strings into numbers? The simplest method is to use: hex& = eval("&" + x$) If you want to be able to deal with invalid hexadecimal numbers and know which digit was at fault then you may wish to use something like the following: proc hex&:(arg$) local result& local tmp$(1), number$(255), digit$(16) : rem Local copy of the argument number$ = upper$(arg$) : rem Store the hex digits in order digit$ = "0123456789ABCDEF" : rem Start at zero. result& = 0 : rem Work from left to right. while (number$ <> "") : rem Extract the leftmost hex digit. In C or : rem assembler we would index into the string : rem directly like an array. tmp$ = left$(number$, 1) number$ = right$(number$, len(number$) - 1) : rem Shift the result left by one hex place. : rem In C/assembler this would be a left shift : rem by four bits result& = result&*16 : rem Add in the newly extracted digit. Note : rem that LOC() returns a position 1..16 for : rem the digits 0..F so we subtract 1. Also : rem note that invalid digits produce strange : rem results since we treat them as -1. We : rem could assume ASCII and convert the value : rem of tmp$ into 0..15 directly. : rem If we were doing this in C/assembler we : rem would use bitwise OR instead. result& = result& + (loc(digit$, tmp$) - 1) endwh return result& endp