Displaying hexidecimal numbers
Posted: Fri Jul 31, 2020 1:34 pm
Hi,
I am working with a binary file. Its a raw image from a camera and I read two bytes of information and convert it to a decimal number with the following two lines of code:
Ignore tItemcount the call puts the important return value into the specified variable, tTagID in this case.
It is useful to be able to view the value in hex when checking the accuracy of the pointers and display it in a field. To do this I use:
This all works but it has taken me a morning to discover the calls so I am wondering if there is another method of displaying the hex values directly from the file?
best wishes
S
I am working with a binary file. Its a raw image from a camera and I read two bytes of information and convert it to a decimal number with the following two lines of code:
Code: Select all
put byte tTagIDByte to tTagIDByte+1 of pImage into tTagIDHex
put binaryDecode ("S*",tTagIDHex,tTagID) into tItemCount
It is useful to be able to view the value in hex when checking the accuracy of the pointers and display it in a field. To do this I use:
Code: Select all
put baseconvert(tTagID,10,16) into tTagIDHex
best wishes
S