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
|
|
|