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

Home » Public Forums » archive » Re: array of structures with pointers
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: array of structures with pointers [message #84200] Mon, 06 May 2013 11:42
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
Great! Thanks, --Wayne

On Monday, May 6, 2013 2:06:12 PM UTC-4, Heinz Stege wrote:
> Hello Wayne,
>
>
>
> you can do this:
>
>
>
> IDL> st = {flux:ptr_new()} ;Create a structure with a pointer
>
> IDL> st = replicate(st,20) ;I want a structure with 20 elements
>
> IDL> st.flux=ptrarr(n_elements(st),/allocate) ;Allocate all pointers
>
> IDL> help,st[0].flux
>
> <Expression> POINTER = <PtrHeapVar1>
>
> IDL> help,st[4].flux
>
> <Expression> POINTER = <PtrHeapVar5>
>
>
>
> Cheers, Heinz
Re: array of structures with pointers [message #84201 is a reply to message #84200] Mon, 06 May 2013 11:06 Go to previous message
Heinz Stege is currently offline  Heinz Stege
Messages: 189
Registered: January 2003
Senior Member
Hello Wayne,

you can do this:

IDL> st = {flux:ptr_new()} ;Create a structure with a pointer
IDL> st = replicate(st,20) ;I want a structure with 20 elements
IDL> st.flux=ptrarr(n_elements(st),/allocate) ;Allocate all pointers
IDL> help,st[0].flux
<Expression> POINTER = <PtrHeapVar1>
IDL> help,st[4].flux
<Expression> POINTER = <PtrHeapVar5>

Cheers, Heinz
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: array of structures with pointers
Next Topic: Can you resize a (Windows) modal widget?

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

Current Time: Wed Oct 08 13:37:51 PDT 2025

Total time taken to generate the page: 0.00387 seconds