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

Home » Public Forums » archive » Re: dereferencing a pointer to a complex structure?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: dereferencing a pointer to a complex structure? [message #43409] Mon, 11 April 2005 17:55 Go to next message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Mon, 11 Apr 2005 08:14:18 -0700, zuzucat@gmail.com wrote:

> I have a troulbe dereferencing a pointer to a complex structure.
>
> multidata = replicate({ grds:ptr_new(findgen(nx, ny))}, n_level) data =
> replicate({time:0, level:multidata}, obs) I
> DL> print, (*data[3].level[3].grds)[0,4]
> 4.00000
>
> ptr_data = ptr_new(data)
>
> I tried (*(*data[3].level[3].grds))[0,4], but it doesn't work.
>
> Any help would be appreciated.
> best,

You need the operator precedence tutorial:

http://www.dfanning.com/misc_tips/precedence.html

JD
Re: dereferencing a pointer to a complex structure? [message #43493 is a reply to message #43409] Tue, 12 April 2005 12:11 Go to previous message
zuzucat@gmail.com is currently offline  zuzucat@gmail.com
Messages: 4
Registered: April 2005
Junior Member
I've read this page, but I couldn't apply the info to this particular
example.

NM

JD Smith wrote:
> On Mon, 11 Apr 2005 08:14:18 -0700, zuzucat@gmail.com wrote:
>
>> I have a troulbe dereferencing a pointer to a complex structure.
>>
>> multidata = replicate({ grds:ptr_new(findgen(nx, ny))}, n_level)
data =
>> replicate({time:0, level:multidata}, obs) I
>> DL> print, (*data[3].level[3].grds)[0,4]
>> 4.00000
>>
>> ptr_data = ptr_new(data)
>>
>> I tried (*(*data[3].level[3].grds))[0,4], but it doesn't work.
>>
>> Any help would be appreciated.
>> best,
>
> You need the operator precedence tutorial:
>
> http://www.dfanning.com/misc_tips/precedence.html
>
> JD
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Run-time Question
Next Topic: dereferencing a pointer to a complex structure?

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

Current Time: Fri Oct 10 10:20:38 PDT 2025

Total time taken to generate the page: 2.23583 seconds