Board index » delphi » ASCII to HEX Conversion help please!!!

ASCII to HEX Conversion help please!!!

Please help

I have a program which lifts portions of one file and deposits them into
another.  Most of this is working fine.  Unfortunately I have to both read
and write to the files in HEX and the values I have assigned appear to be
ASCII.  I either need to discover a different way of reading from and
writing to the files (ie. in HEX) or I will need a procedure to convert the
variables from ASCII to HEX.

Any help with this would be greatly appreciated.

TC.

PS. I'm a newbie at all of this - please take that into account with any
answers!

 

Re:ASCII to HEX Conversion help please!!!


Tim Carey schrieb:

Quote

> Please help

> I have a program which lifts portions of one file and deposits them into
> another.  Most of this is working fine.  Unfortunately I have to both read
> and write to the files in HEX and the values I have assigned appear to be
> ASCII.  I either need to discover a different way of reading from and
> writing to the files (ie. in HEX) or I will need a procedure to convert the
> variables from ASCII to HEX.

> Any help with this would be greatly appreciated.

> TC.

> PS. I'm a newbie at all of this - please take that into account with any
> answers!

Var S : String;
    R : Real;
    K : Integer;

S := '1234.567';
Val(S,R,K);
if K <> 0 then Writeln('Error in numberstring ',S,' at position ',K);

http://www.geocities.com/~franzglaser/tp.html
Regards,
Franz Glaser
http://members.eunet.at/meg-glaser

Other Threads