resolve_routine [message #6884] |
Tue, 20 August 1996 00:00  |
Klaus Martin Pontoppi
Messages: 1 Registered: August 1996
|
Junior Member |
|
|
I'm having trouble using the resolve_routine procedure as the
documentation for this is very sparse. 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:
resolve_routine, NAME, [/IS_FUNCTION]
I'm not sure what the NAME (a string or string array) actually has to be
i.e. a path and filename or only a filename in the IDL path. The
resolve_routine works fine with the IDL library procedures, but I fail
to detect the difference between these and my own procedures. The
documentation claims that it works with user-written procedures, so....
I would be most grateful if someone could help me with this problem.
--
Klaus Martin Pontoppidan
pontop@astro.ku.dk
|
|
|
Re: RESOLVE_ROUTINE [message #33441 is a reply to message #6884] |
Fri, 03 January 2003 13:50  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Darrick White (darrick.white@med.ge.com) writes:
> Okay, I'm starting to pull my hair out and I'm sure this is an easy
> question to answer.
>
> Version: IDL 5.6
> Platform: Windows
>
> I want to call the following function (rb_dim_str) from within IDL's
> library file rb_routines.pro. Before I call the function I have the
> following piece of code:
> RESOLVE_ROUTINE, 'rb_routines', /COMPILE_FULL_FILE, /EITHER
>
> The IDLDE recognizes that the function has been compiled.
> ROUTINE_INFO(/FUNCTIONS) returns the rb_dim_str. IDL's command line
> recognizes that the function is compiled (I can type the function at
> the command line and receive a value back). However, when stepping
> (running) my application, I get the following error: Variable is
> undefined: RB_DIM_STR.
>
> Here is a snippet of code:
>
> Function CreateStructure, rb_template_use
>
> ON_ERROR, 2
>
> RESOLVE_ROUTINE, 'rb_routines', /COMPILE_FULL_FILE, /EITHER
>
> .
> .
> .
> result = rb_dim_str( value1, value2 )
> .
> .
> .
>
> End
Sigh... I suppose it is asking too much to insist people
name their procedures and functions properly to avoid all
this rigamarole. And I *know* it is too early in the year
to feel this crappy. :-(
I think the problem probably have to do with the order in
which the routines are listed in rb_routines. But the chances
of getting *that* sorted out are probably about nil.
I'd try adding a FORWARD_FUNCTION RB_DIM_STR just after your
RESOLVE_ROUTINE command and see if that doesn't help some.
Or, you could just grab the RB_DIM_STR function out of the
library and put it in a file name rb_dim_str.pro and for sure
things will work better. :-)
Cheers,
David
P.S. I'd also exit IDL and start over. Once IDL gets
its mind made up that something is a variable, it is
hard to convince it otherwise.
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|