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

Home » Public Forums » archive » Re: pointer to structures
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: pointer to structures [message #19568 is a reply to message #19567] Tue, 04 April 2000 00:00 Go to previous message
Ben Tupper is currently offline  Ben Tupper
Messages: 186
Registered: August 1999
Senior Member
eeeyler@my-deja.com wrote:

> suppose I wish to create a structure and wish to reference that
> structure and its contents via a pointer:
> filter=ptr_new({points:['a','b'],pt1_value:200, pt2_value:'X_WHYLOG'})
> how do I reference the points array? I thought it would be as:
> print, *filter.points
> but I get the message
> %Expression must be a structure in this context: Filter
> Thank you for your help!
>
>

Hello,

You must first derefence the pointer before derefencing the structure.

IDL> print,(*filter).points
a b

This is the exact problem I bump into all the time when I have structures
of pointers or pointers of structures of pointers. I always have to slow
down and noodle it out. Unfortunately, for me, it has been just like
riding a bike... I seem to always forget.

Good luck,

Ben

--
Ben Tupper

Bigelow Laboratory for Ocean Science
tupper@seadas.bigelow.org

pemaquidriver@tidewater.net
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: get variables name
Next Topic: Re: Speed up movie in object graphics.

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

Current Time: Fri Oct 10 10:09:08 PDT 2025

Total time taken to generate the page: 0.07976 seconds