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

Home » Public Forums » archive » Re: include file?
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 file? [message #20508 is a reply to message #20494] Thu, 29 June 2000 00:00 Go to previous message
Robert Weiss is currently offline  Robert Weiss
Messages: 5
Registered: February 2000
Junior Member
Hello,

what you are looking for are common blocks. Start the onlice documentation
and look up 'common blocks' in the index. If you're familiar with
FORTRAN: the concept is quite the same.

Another possibility (one that I prefer because I'm always suspicious of
global variables) is to use a structure of constants (with pointers if the
the constants are larege arrays) and explicitly include the structure in
the call to your functions and procedures.

Hope that helps,

Robert.

P.S.: If it's physical constants your using it's most convenient to define
them in the idl_startup.pro file, sice you can then always refer to them
without problems (on a UNIX system it is the necessary to set the
environment variable IDL_STARTUP to this file, for WinDO$ and
MAC I dunno...).

Stu wrote:

> Hi,
> I have several different routines that all set up the same or slightlly
> different constants etc at the beginning,
> is it possible to have all the constants in one file, and have all my
> functions/procedures reference this file
> when they start? It would make for easier maintainence this way. How
> would it be done? I can't see a
> normal function or procedure doing the job as you would have to ask for
> each constant explicitly, which is a
> bit of a pain.
>
> cheers,
> Stu
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FFT-help!
Next Topic: Re: Sort and Where - SOLVED!

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

Current Time: Sun Oct 12 10:41:02 PDT 2025

Total time taken to generate the page: 0.71804 seconds