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

Home » Public Forums » archive » Re: basic structure question
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: basic structure question [message #77971] Thu, 13 October 2011 15:33
Avian is currently offline  Avian
Messages: 24
Registered: October 2011
Junior Member
Thanks Paulo - I should've thought in terms of creating a new one, not trying to add to an existing one!
Re: basic structure question [message #77972 is a reply to message #77971] Thu, 13 October 2011 15:20 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Oct 13, 7:13 pm, SonicKenking <ywa...@gmail.com> wrote:
> On Oct 14, 9:06 am, Avian <dflat...@gmail.com> wrote:
>
>> Hi - I'm just getting into the nitty gritty of IDL, and had a quick question.
>
>> Is there a way to add an existing structure into another structure as a tag? In other words, to not put it on the same level as the first structure?
>
>> If I have a structure called J that has a zillion tags, and I want to put it into an existing structure called K (which has its own tags), the new structure would be
>
>> K,ktag1,ktag2, J
>>                       - J's zillion tags beneath this accessible as K.J.tag1, etc...
>
>> Hope that made some sense.
>
>> Thanks in advance!
>
> a = create_struct(k, 'j', j)

Just note that this is making a new structure (a), not adding into the
existing structure (k), as was asked. Structures are static, so no
fields can be added, removed or have their types or dimensions changed
after definition.
Re: basic structure question [message #77973 is a reply to message #77972] Thu, 13 October 2011 15:13 Go to previous message
SonicKenking is currently offline  SonicKenking
Messages: 51
Registered: October 2010
Member
On Oct 14, 9:06 am, Avian <dflat...@gmail.com> wrote:
> Hi - I'm just getting into the nitty gritty of IDL, and had a quick question.
>
> Is there a way to add an existing structure into another structure as a tag? In other words, to not put it on the same level as the first structure?
>
> If I have a structure called J that has a zillion tags, and I want to put it into an existing structure called K (which has its own tags), the new structure would be
>
> K,ktag1,ktag2, J
>                       - J's zillion tags beneath this accessible as K.J.tag1, etc...
>
> Hope that made some sense.
>
> Thanks in advance!

a = create_struct(k, 'j', j)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: basic structure question
Next Topic: Re: legend() with a mix of plot() and contour()

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

Current Time: Wed Oct 08 15:17:42 PDT 2025

Total time taken to generate the page: 0.00597 seconds