| Re: resolve_routine [message #6832] |
Tue, 27 August 1996 00:00  |
David Theil
Messages: 11 Registered: May 1996
|
Junior Member |
|
|
Klaus Martin Pontoppidan wrote:
>
> IDL complains that the
> function/procedure that I'm trying to compile from inside a procedure is
> undefined! And of course it is undefined - it isn't compiled yet...
> The syntax as described in the documentation is:
>
> --
> Klaus Martin Pontoppidan
>
> pontop@astro.ku.dk
A common reason for this problem is that the called routine is in the
same file as
the calling routine, but AFTER the calling routine. When IDL compiles
the calling
routine, it cannot link in the called function because it is undefined
at that point.
If you force the file to recompile, it will then see the the compiled
called function.
This is still a dangerous situation because any changes you make to the
called function
will not take effect when this function is called from the parent
routine until
the second recompilation.
The obvious way to avoid this sort of problem is to always put all of
the called
sub-routines before the parent routine in any file that contains both.
----------
David Theil
home work
University of Colorado
3360 34th St. D campus box 389
Boulder, Colorado Boulder, Colorado
80301 80309
(303)449-3113 (303)492-0895
No guts, no glory.
|
|
|
|