Re: Compile Problem with IDL5.2 [message #16328] |
Wed, 21 July 1999 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Joerg Mosthaf (joerg.mosthaf@urz.uni-heidelberg.de) writes:
> I got a little problem with compiling programms in IDL5.2. Usually everything
> works just fine, but sometimes (about 1 in 5) some procedure or function just
> doesn't compile and I get an "undefined variablename"-error with the name of
> the procedure as undefined variablename. If I compile the programm again after
> the error, it usually runs fine.
> All my procedures are in one file and the main procedure is the last one.
This is a classic symptom of a function being called
before it is compiled, so I am dubious about your statement
that all the procedures and functions are in a single file,
with the main procedure as the last one.
I presume you know that any procedure or function in front
of the last module should be utility routines for the last
module? That is to say, one way this could be happening
(the "1 in 5" strongly suggests it) is that you have
a function in the "main" file that you are calling from
within some other program. If that function gets called
before the main program is called, then you will get
this error.
If this is the case, then you want to take that
function module out and put it in its own file. That
way both programs will be able to use it without
running into this problem.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|