|
Re: basic structure question [message #77972 is a reply to message #77971] |
Thu, 13 October 2011 15:20  |
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  |
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)
|
|
|