comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » dereferencing a pointer to a complex structure?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: dereferencing a pointer to a complex structure? [message #43481 is a reply to message #43417] Tue, 12 April 2005 15:48 Go to previous messageGo to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Tue, 12 Apr 2005 12:57:46 -0700, zuzucat@gmail.com wrote:

> Mr. Chris Torrence at RSI kindly phoned my supervisor to tell us the
> answer.
>
> Thank you very much, all.
>
> print, (*(*ptr_data)[3].level[3].grds)[0,4]
> best,

This is exactly how the tutorial tells you to do it (even though this
isn't the question you had asked).

The easy to remember, basic rule from the tutorial: group with (*xxx)
all "xxx" which are pointers, unless the () would then occur on the
"outside" of the expression (it wouldn't hurt, it's just a waste).

So in your case the pointer "ptr_data" must be treated this way:

(*ptr_data)

as must the pointer "(*ptr_data)[3].level[3].grds":

(*(*ptr_data)[3].level[3].grds)[0,4]

if you didn't want to subscript the final FINDGEN, you could just use:

*(*ptr_data)[3].level[3].grds

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: dereferencing a pointer to a complex structure?
Next Topic: structure access using strings for tag-names

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 10:46:12 PDT 2025

Total time taken to generate the page: 0.32498 seconds