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

Home » Public Forums » archive » Re: Calling data from a structure of pointers?
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: Calling data from a structure of pointers? [message #43031 is a reply to message #43030] Thu, 10 March 2005 14:46 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jonathan Greenberg writes:

> Hopefully this'll be a quicky -- I have a structure of pointers, so if I,
> for instance, print,structure.pointername I get something like:
>
> <PtrHeapVar5917><PtrHeapVar5922>
>
> I want to ACCESS the data from that structure tho, but:
>
> print,*structure.pointername doesn't work, nor does
> print,structure.*pointername nor:
>
> tempvar=structure.pointername
> print,*tempvar
>
> How do I retrieve the data the pointers are referring to?

If you really have a structure of pointers, then this *must*
work:

IDL> Print, *structure.pointername

Because structure dereferences have a higher order of precidence
than pointer dereferences.

But from your description, it seems more likely that structure
is a pointer to a structure of pointers. (I can't really tell
*what* you have there.)

Perhaps something like this would work with whatever it
is you have:

*(*structure).pointername

You might find this article helpful:

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

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: least square matrix
Next Topic: Editting IDL files under MacOS X

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

Current Time: Sat Oct 11 01:53:53 PDT 2025

Total time taken to generate the page: 0.00309 seconds