Table of Content
HAL Forum
fucntion Integer BitAnd (
Integer i1,Integer i2)
Description:
Returns value of all bits Bit And operation of 2 Integers
Parameters:
i1 Integer
i2 Integer
procedure NumToHex(string instr,var string res)
BEGIN
  string 16 hexs;
  LongInt l,i;
  string 255 tstr;
  
  res = "";
  l = FirstInRange(instr,10);
  hexs = "0123456789ABCDEF";
  for (i=0;i<8;i=i+1) begin
    tstr = tstr & Mid(hexs,BitAnd(l,15),1);
    l = l/16;
  end;
  for (i=len(tstr);i>=0;i=i-1) begin
    res = res & Mid(tstr,i,1);
  end;  
  RETURN;
END;
Related topics:
««