How do I add a variable to watch in hex?

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
 
G

Guest

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().
 
D

Dave

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top