AnsweredAssumed Answered

How to typecast a string into a hexnumber?

Question asked by VRFuser on Feb 2, 1998
>I am parsing a string and retreiving a substring.  The substring number has
>been stored as ASCII in hex.
>I want that substring to be read as a ASCII in hexadecimal format.  Or to
>put more do I get the string I have read to be recognized as a
>hex number?

Hi Troy,

Send it to a "FROM STRING" box and set the format on your READ TEXT statement
to HEX FORMAT.  The output will be an integer32 with the decimal value of your
HEX input.  For example, if you put in "FC", you will get 252 on the output pin.
Once in decimal format, you can do almost anything with it.

If you ever need to convert it back to HEX (represented by ASCII characters),
you can either use the "TO STRING" box, or you can just set the PROPERTIES of
many of the display type objects to HEXIDEIMAL FORMAT and it will do it for you.

Mike Groves
Ericsson Inc.
Morgan Hill, Ca