Board index » delphi » Hex to Decimal?

Hex to Decimal?

Ok, I know this MUST be an easy one, but it has me foxed. I have a
string in Hexadecimal format and I want to convert it into a single
precicion number in decimal format. I thought the FORMAT command would
do it, but even adding a $ at the start didn't help. Anyone got an
answer?

Best wishes - Tim

 

Re:Hex to Decimal?


Val('$'+MyHexString, MyInteger, MyError);

HTH, Michael

Tim Gathercole schrieb:

Quote

> Ok, I know this MUST be an easy one, but it has me foxed. I have a
> string in Hexadecimal format and I want to convert it into a single
> precicion number in decimal format. I thought the FORMAT command would
> do it, but even adding a $ at the start didn't help. Anyone got an
> answer?

> Best wishes - Tim

Other Threads