How do I add a variable to watch in hex?

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I would like to view an array of bytes from a file stream in hex. I
saw guidance awhile back which recommends using hex(varname), but this
only seems to work one byte at a time. Does anyone know how to tell
the watch window to display all info for a variable in hex?

Thanks in advance.
Dave Smith
 
You could open the file as binary and read it bytewise, using hex() on each
byte; e.g. Open FilePath for Binary Read as #1

Otherwise, as far as I know, there is no built-in functionality for
conversion of arbitrary data types to their hex components. You would
probably need to parse and convert it yourself; i.e. find out how the
variable type is constructed and then break it down into its component bytes,
store each in a Byte variable, and then you could convert to hex().
 
Thanks K. As I re-read my post, I recognize my question wasn't clear
(the downside of doing anything at 6:20am) :-) I actually have the
file read in to an array already, I just want to view the array in hex.
 
Back
Top