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

Home » Public Forums » archive » Including files/eps into PS
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: Including files [message #15522 is a reply to message #11442] Mon, 24 May 1999 00:00 Go to previous messageGo to previous message
J.D. Smith is currently offline  J.D. Smith
Messages: 214
Registered: August 1996
Senior Member
Nils Johnson wrote:
>
> The IDL documentation mentions include files, which allows "statements
> contained in an include file" to be "textually inserted into the including
> file."
>
> However, I can not find any mention or examples of how, exactly, to
> include other files. What is the syntax? Are there any examples in the
> documentation or sample code that comes with IDL?
>
> Nils

@foo

includes the file foo (or foo.pro) which exists in the search path. The
usual search order issues apply (multiple files foo lead to unexpected
results!).

One way this can be used to advantage is with common block definitions.
If there is not a known entry point for defining a common block which is
used by various different procedures, you must either define it
beforehand in some startup routine which the user must remember to run
or put in their startup file, or else simply define the common block in
all routines in which it's used. That is, you must use:

common cblock, var1, var2, var3, var4, ...

everywhere instead of:

common cblock

Normally this is a real pain, since changing the common block requires
changing all of its definition statements. However, if you put the
definition in one file and simply do a:

@cblock

at the beginning of all relevant procedures, you can change your common
block in one place and still not require an initializer. Of course,
eliminating the common block is another good solution, but sometimes
this can't be done.

This technique can be extended to other areas also, such as common error
checking code, etc.

Good Luck,

JD

--
J.D. Smith |*| WORK: (607) 255-5842
Cornell University Dept. of Astronomy |*| (607) 255-6263
304 Space Sciences Bldg. |*| FAX: (607) 255-5875
Ithaca, NY 14853 |*|
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: When you can't concatenate structures like you expect....
Next Topic: Re: Hex constants interpreted differently in IDL/v5.2

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

Current Time: Thu Oct 09 21:12:18 PDT 2025

Total time taken to generate the page: 0.88465 seconds