Board index » delphi » TP6: Converting a hex string to an integer?

TP6: Converting a hex string to an integer?

I am reading data from a file, some of which is a hex string
eg '$FEDC'. Is there an easy way to convert this to an integer
for use in my calculations in TP6?

Thanks for your help,

Mike Watson.
--
Mayes uk

 

Re:TP6: Converting a hex string to an integer?


Quote
Mayes uk (Ma...@d-m-g.demon.co.uk) wrote:

: I am reading data from a file, some of which is a hex string
: eg '$FEDC'. Is there an easy way to convert this to an integer
: for use in my calculations in TP6?

: Thanks for your help,

: Mike Watson.
: --
: Mayes uk
Yes, Mike.
The Val procedure handles Hexa.
Val('$FF',I,V)
will yield:
I=255
V=0

Ariel.

Other Threads