B4R Question Very simple quesiton about bytes

daveinhull

Active Member
Licensed User
Longtime User
Hi,

I have a byte value representing an ASCII character and when I output it using Log I get the ASCII value as expected, but how to I output the actual ASCII character?

Thanks in advance
Dave
 

janderkan

Well-Known Member
Licensed User
Longtime User
B4X:
Dim BC as ByteConverter
Dim Char as byte = 65 'A
Log(BC.StringFromBytes(array as byte(Char)))
 
Upvote 0

daveinhull

Active Member
Licensed User
Longtime User
Hi Janderkan,

Many thanks. Since posting I've been looking further and trying different things and was getting close to this, so thanks.
However, I'm sure I read in a post from Erel, that it wasnt necessary often to use StringFromBytes as it was possible to output (maybe that doest mean Log) bytes as characters directly - of course I could easily have miss read that while searching.

Thanks again
Dave
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…