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

Home » Public Forums » archive » Conflicting data structures.
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
Conflicting data structures. [message #38237] Fri, 27 February 2004 08:11
Nuno Oliveira is currently offline  Nuno Oliveira
Messages: 75
Registered: October 2003
Member
I have I problem, and perhaps you can help...

I have pointer of structures. I defined in the main program as Data =
ptr_new(/allocate_heap)

And the when the user starts to generate events I have a structure like
this. I made it an isolated function just to avoid problems with
defining structures, but it still does. How is this possible?

PRO Add_NewStrct, s
new_strct = {tag1: name, tag2: array, tag3: ptr_new(/allocate_heap)}
new_strct.tag3 = Result_of_a_function()
;if it matters is the result is a pointer do pointers

if n_elements(*s.Data) eq 0 $
then *s.Data = new_strct $
else *s.Data = [*s.Data, new_strct]

return, s
end

The error idl indicates is: data conflicting strucutures <ptrHep xyz>
new_strct

I tought once the function is finished he would loose previuos
information about the strcuture? But it seems that's not it.
I was looking in old questions here, and I tried to use ptr_free for
that tag3, but I had the same problem again...

Cheers,

Nuno.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Displaying Programs
Next Topic: Re: Conflicting data structures.

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

Current Time: Sat Oct 11 03:56:23 PDT 2025

Total time taken to generate the page: 0.08330 seconds