Table of Content
HAL Forum
function val Power (
integer Number,integer ModNumber)
Description:
Exponential expression. The input is raised to the power of specified value.
Parameters:
Number The base to use
ModNumber The exponent
function Integer HexToInt(string instr)
begin
  Integer res;
  string 16 hexs;
  Integer pos,slen,i,t;

  res = 0;
  slen = len(instr);
  hexs = "0123456789ABCDEF";
  for (i=slen;i>0;i=i-1) begin
    pos = FindStrPosition(hexs,Mid(instr,i-1,1));
    res = res + pos*Power(16,(slen-i));
  end; 
  HexToInt = res; 
  return;  
end;

Related topics:
««