RESOLVE_ROUTINE [message #33442] |
Fri, 03 January 2003 13:16  |
darrick.white
Messages: 7 Registered: January 2003
|
Junior Member |
|
|
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
Thanks
-Darrick
|
|
|
Re: RESOLVE_ROUTINE [message #33516 is a reply to message #33442] |
Mon, 06 January 2003 14:24  |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
"Darrick White" <darrick.white@med.ge.com> wrote in message
news:e5624c04.0301031316.5ce597d@posting.google.com...
> [snip]
>
> 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
>
< [snip]
Try adding the following declaration to your function
compile_opt STRICTARR
This makes it clear to the compiler that the reference to rb_dim_str
is a function call. It may solve your problem.
--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
|
|
|