Re: Function as variable issue but in own file [message #68593] |
Fri, 13 November 2009 15:12 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
rdh writes:
> I'm getting the error "Variable is undefined: foobar" for one of my
> functions when I save and run my program as a standalone .sav file.
> Everything works fine directly in IDL. The function is in it's own
> file called foobar.pro. I thought this was supposed to resolve any
> compile issues....I also run resolve_all before saving the standalone
> file. And, when checking the compile output, foobar.pro is actually
> compiled before all the procedures and functions that call it. What
> else am I missing?
Off-hand, I would say you were missing COMPILE_OPT STRICTARR
in all of your procedures and functions.
Otherwise, I suspect at least one of your assumptions
about the facts as you present them is wrong. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|