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

Home » Public Forums » archive » Re: include files in IDL programs
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: include files in IDL programs [message #22514 is a reply to message #22503] Fri, 17 November 2000 00:00 Go to previous message
ngls is currently offline  ngls
Messages: 10
Registered: November 2000
Junior Member
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
>
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: structure__define
Next Topic: IDL Bug? (Re: include files in IDL programs)

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

Current Time: Mon Apr 27 11:14:30 PDT 2026

Total time taken to generate the page: 0.39998 seconds