[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: include files in IDL programs




If you're only interested in this for a structure, try using IDL's "automatic 
structure definition".

If you create a PROcedure with the same name as the structure, but followed 
by __DEFINE (that's two underscores) and save it as a .pro with the same name 
then IDL will look for this file the when it encounters a reference to your 
undefined structure. Running the code will then define the structure.

The example the online help:

PRO mystruct__define
   tmp = { mystruct, a:1.0, b:'string' }
END

We use it all the time and it works a treat. The same method is used for 
object definition.

Justin


rhskelto@atm.ox.ac.uk (Randall Skelton) wrote in 
<Pine.LNX.4.21.0011171001370.11594-100000@mulligan.atm.ox.ac.uk>:

>Hello all,
>
>This is a longshot but is there any way to have an 'include file' in IDL.  
>i.e. I have a data structure which is rather complicated (and big in type)
>and I don't want to see it in every program/subroutine that I write.  Is
>there anyway just to have it included with a simple '#include blah.pro' or
>somthing similar?
>
>Thanks in advance,
>
>Randall
>