On Dec 30, 2004, at 4:16 PM, Charles Yeomans wrote:
On Dec 30, 2004, at 6:23 PM, Ken Fleisher wrote:
Hi. I know this is a simple question, but I just have not been able
to figure it out. I have data in a memoryblock and I want to put a
portion of it into a string variable as hex code. I've been trying to
use the following to transfer the data:
var = m.stringvalue( offset, size )
and variations on this. What I can't figure out is how to get the hex
representation of the data. The data is not actually a string, so is
there a different way to transfer an arbitrary block of data and
store it as hex?
Here's one way:
For i = start to finish
s = s + Hex(m.Byte(i))
Next
This example makes the point of the need to "hexify" the characters,
but, given other threads on the immutableness of strings, I now cringe
when I see:
s = s + .....
in a For...Next loop.
I saw Phil's posting, so know that a more efficient implementation has
already been provided.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|