471,088 Members | 1,253 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,088 software developers and data experts.

Converting hex values to string

1
I have a byte array loaded with hex bytes read from a device on a com port. I need to convert the bytes into a string, but without doing any conversion to decimal, integer. etc. In other words, when I have a hex value of &H37, I need to convert it to a string of "37". Sounds simple, but has me puzzled so far.
Apr 2 '21 #1
1 3829
cactusdata
200 Expert 128KB
Hex will do that:

Expand|Select|Wrap|Line Numbers
  1. HexText = Hex(&H37)
  2.  
  3. ? HexText
  4. 37
Apr 3 '21 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Jus! | last post: by
10 posts views Thread by Wouter vanEck | last post: by
1 post views Thread by Kevin S Gallagher | last post: by
3 posts views Thread by Jef Driesen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.