I was wondering if someone knew how to add more values to a structure variable in IDL?
For example, if we have the structure 'struct'
struct = {structname, x:[1,2,3], y:[10,11,12]}
And I specifically wanted to add [4,5,6] to x, something like:
struct.x.add([4,5,6])
How would I do this?
If you made
xa list instead of an array, you could do this easily:It is more difficult, and less efficient, to use arrays for lists of things that change length. You definitely can't do it with named structures because the only way to do it is to change the definition of the structure, which you can do only if you replace one anonymous structure with another.