Here is a formula that I created. It proabably could be made more efficient, but it works. It assumes a text string for the IP address with no "0x" at the front of the string (see string variable hex). Hope it works for you.
stringvar hex := "ab4f34ba";
numbervar i;
stringvar subhex;
numbervar octet;
stringvar ipstring :="";
numbervar multiplier;
for i := 0 to 3
do (
subhex := mid(hex,i*2+1,1);
if subhex > "9" then
multiplier := switch(subhex = "f", 15, subhex ="e", 14, subhex ="d", 13, subhex ="c", 12, subhex ="b", 11, subhex ="a", 10)
else
multiplier := val(subhex)
;
octet := multiplier * 16;
subhex := mid(hex,i*2+2,1);
if subhex > "9" then
multiplier := switch(subhex = "f", 15, subhex ="e", 14, subhex ="d", 13, subhex ="c", 12, subhex ="b", 11, subhex ="a", 10)
else
multiplier := val(subhex)
;
octet := octet + multiplier;
if ipstring = "" then
ipstring := totext(octet,0)
else
ipstring := ipstring + totext(octet,0);
if i <> 3 then ipstring := ipstring + ".";
);
ipstring;