|
Re: Problems of IDL search path and runtime source file compilation or saved routines restoration. [message #35697 is a reply to message #35674] |
Tue, 01 July 2003 07:08  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
TIAN Yunfeng writes:
> I use IDL 5.6 in Redhat Linux 7.3. There is a user function called
> flt_img which returns the common file suffix. The flt_img.pro file
> locates in my own directory (/home/idl/src/flt_img.pro). I appended
> the /home/idl/src directory to the IDL !PATH variable. But when I
> called this function, such as
> print,flt_img()
> I got:
> % Syntax error.
> After I open flt_img.pro and compile it, it works fine. The expected
> result is:
> ENVI>print,flt_img()
> *.img *.dat *.jpg *.bil *.jpeg *.bmp *.tif *.png *.gif *.hdf *.raw
> *.lan *.pix
>
> My question is does IDL in Linux not support searching through !PATH
> for the target .pro file and then compiling it when called from other
> thread?
No, IDL supports !Path file searching, even in Linux. The
problem is elsewhere.
> In Microsoft Windows XP, it works like this:
> ENVI> print,flt_img()
> % Compiled module: FLT_IMG.
> *.img *.dat ...
>
> Why IDL in Linux does not compile the flt_img.pro file when be called?
I can think of several possibilities:
1. The PATH is not set up exactly as you describe. How did you
set it up? Did you check it? How? A small typo here can cause
havoc. :-)
2. On your Windows machine you may have a version of FLT_IMG
in your current directory and it is this version that is being
called, not the one you think is being called. After you
compile the function automatically, use HELP, /SOURCE to see
where it was found. Is this were you expect it to be found?
3. On your Linux machine, the PATH contains *another* file
named FLT_IMG that is different from the one you are trying
to find. It is finding this one first. Change the order of
the directories on your path. Does this make a difference?
Cheers,
David
--
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
|
|
|