Re: Viewing A Pointer As An Array
Re: Viewing A Pointer As An Array
- Subject: Re: Viewing A Pointer As An Array
- From: Paul Russell <email@hidden>
- Date: Sat, 17 May 2008 09:06:28 +0100
Thanks for the useful tip. I just played with this and found a couple
of other useful things:
- You don't need the cast and the dereference if the pointer is
already of the correct type, i.e. you can just say foo@256.
- The array size after the @ can also be a variable, e.g.
foo@foo_length.
Cool.
Paul
On 16 May 2008, at 19:30, Rick Sustek wrote:
Yes indeed:
create a new expression, using the var@len syntax, examples:
For an integer array named foo:
*(int *)foo@256
For a float array named rootBeer:
*(float *)rootBeer@64
This will expand in the expressions window, with a disclosure
triangle so you can collapse it, if desired. The length is simply
however many you want to display -- even beyond the actual array
bounds if you use a number that is larger than the array depth.
Happy, happy, joy, joy,
-Rick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden