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 #15523 is a reply to message #11442] Mon, 24 May 1999 00:00 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
nilsj@unixg.ubc.ca (Nils Johnson) writes:
>
> 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?

It is not particularly good programming style to do this, and hence I
use it all the time! :-)

Here is you you do it:

pro mypro, arg1, arg2

arg1 = arg2 + 5
... etc
@myinclude.pro

return
end

Note that the standard path is consulted in including myinclude.pro,
otherwise it should be in your current directory. Text is included
from the file verbatim. In the example above, @myinclude.pro appears
within a procedure. Therefore, myinclude.pro should contain neither a
PRO or FUNCTION declaration, nor a final END statement. Works the
same as a C #include directive.

Happy programming,
Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@astrog.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[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: Sun Oct 12 10:25:17 PDT 2025

Total time taken to generate the page: 1.20148 seconds