Board index » delphi » Any Hex to Decimal function or component?

Any Hex to Decimal function or component?

Hi,
Is there any function or component can chnage a hex number to decimal?
Thanks in advance.

nyt
yeet...@iname.com

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

 

Re:Any Hex to Decimal function or component?


You should be able to use StrToInt such as below:

function HexToInt(const HexStr: string): integer;
begin
  Result:= StrToInt('$'+HexStr);
end;

In article <7fbl3b$9c...@nnrp1.dejanews.com>,
  nyt <yeet...@iname.com> wrote:

Quote
> Hi,
> Is there any function or component can chnage a hex number to decimal?
> Thanks in advance.

> nyt
> yeet...@iname.com

> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

Other Threads