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

Home » Public Forums » archive » 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
Structures [message #42921] Tue, 01 March 2005 13:29
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
This isn't a problem, just an academic question. I'm curious why IDL
does what it does, but aren't we all?

Once you create a structure, you cannot change type of the variables
within the structure, including array sizes. Once the structure is
created and named, you can't change an integer array[100] to an integer
array[10] or anything else with a different size. This came as a
surprise to me since I think of "int array" as being the type, not "int
array[100]" or "int array[10]". Why does IDL enforce such a rigid
*structure* on structures when the rest of the language which leaves you
free to change types, sizes and everything else under the sun? It just
doesn't seem to mesh with the rest of the language.

I learned all this the hard way by trying to figure out why I kept
getting errors when I'd attempt to use a different array size for some
of my structure variables. I finally ran across this in the IDL
documentation, but there wasn't any actual reason given for such
draconian policy, especially when compared to the rest of the language.
It's really not a big deal since I can create anonymous structs
everywhere instead of using named structures. Do named structures
actually serve a useful purpose other letting you condense your syntax
when creating them?

-Mike
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Help optimizing the nested for loops
Next Topic: Odd error on startup: FlexIm error -57357

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

Current Time: Sat Oct 11 08:03:54 PDT 2025

Total time taken to generate the page: 1.92180 seconds