Board index » cppbuilder » Reinterpreting Debug Inspector values

Reinterpreting Debug Inspector values


2005-11-17 09:40:26 AM
cppbuilder56
Let's say I have an array of chars. How can I use the Debug Inspector to compute for instance what value byte 2 to 10 of the array would be if it is interpreted as a double?
 
 

Re:Reinterpreting Debug Inspector values

Martin Hansen wrote:
Quote
Let's say I have an array of chars. How can I use the Debug Inspector
to compute for instance what value byte 2 to 10 of the array would be
if it is interpreted as a double?
If your array is called Ar, then try this:
(double)(Ar+2)
HTH
Jonathan
 

Re:Reinterpreting Debug Inspector values

"Jonathan Benedicto" < XXXX@XXXXX.COM >wrote:
Quote
If your array is called Ar, then try this:
(double)(Ar+2)
Where should I write that? I tried both Evaluate and Debug Inspector->Type cast. No luck after appending a * after double either.
 

{smallsort}

Re:Reinterpreting Debug Inspector values

Martin Hansen wrote:
Quote
Where should I write that? I tried both Evaluate and Debug
Inspector->Type cast. No luck after appending a * after double
either.
I'd try it in the Inspector. Not under type cast, just type it straight
into the inspector.
HTH
Jonathan
 

Re:Reinterpreting Debug Inspector values

"Jonathan Benedicto" < XXXX@XXXXX.COM >wrote in message
Quote
If your array is called Ar, then try this:

(double)(Ar+2)
That will not produce what Martin is asking for. Try this instead:
* (double*) &Ar[2]
Gambit
 

Re:Reinterpreting Debug Inspector values

"Martin Hansen " < XXXX@XXXXX.COM >wrote in message
Quote
Where should I write that? I tried both Evaluate and
Debug Inspector->Type cast. No luck after appending
a * after double either.
Right click on the Inspector and choose the "New Expression" option.
Gambit
 

Re:Reinterpreting Debug Inspector values

"Remy Lebeau \(TeamB\)" < XXXX@XXXXX.COM >wrote:
Quote
That will not produce what Martin is asking for. Try this instead:

* (double*) &Ar[2]
That did the trick. Thanks both of you.
Martin