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 #43030 is a reply to message #43028] Thu, 10 March 2005 15:09 Go to previous messageGo to previous message
R.G.Stockwell is currently offline  R.G.Stockwell
Messages: 163
Registered: October 2004
Senior Member
"Jonathan Greenberg" <usenet@estarcion.net> wrote in message
news:BE560C66.3FE3%usenet@estarcion.net...
> 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>

This is an odd result.
My guess is that structure.pointername is a structure of pointers.
(i.e. you have a stucture where the tag "pointername" is a structure
that has two pointers in it.


Anyways, here is a snippet showing how the structures and pointers work:

s = {p1:ptr_new(/alloc),p2:ptr_new(/alloc)}

pointtostruct = ptr_new(/alloc)
*pointtostruct = s
*s.p1 = 15
*s.p2 = 'hello'

print,'s.p1'
print,s.p1

print,'s.p2'
print,s.p2

print,'*s.p1'
print,*s.p1

print,'pointtostruct'
print,pointtostruct

print,'*pointtostruct'
print,*pointtostruct

print,'*(*pointtostruct).p1'
print,*(*pointtostruct).p1


end
[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:52:30 PDT 2025

Total time taken to generate the page: 0.63930 seconds