IDL> print, file_which(‘chjuldaytolmstGALFA.pro’)
/usr/share/astro/idlshare/locallib/chjuldaytolmstGALFA.pro
and more specifically:
from https://stackoverflow.com/questions/29986130/idl-procedure-wont-compile
But when I try to find the procedure using “Findpro” I get
Procedure CHLOADCT found in directory /data/clh93/colortables/CH/
So my paths are right. I don’t understand why it won’t find my procedure, does anyone know what’s going on?
Answers:
Things to check in situations like this:
- you are consistent about whether the routine is a function or procedure, i.e., routine is procedure and you are calling it as a procedure
- routine you are calling is either compiled already or the last routine in a file named the same as it with a
.pro extension; the case of the filename and routine call must match or the filename must be all lowercase (just use all lowercase in filenames!)
- quick check to see if
my_routine.pro is in your !path:
IDL> print, file_which('my_routine.pro')
It will return an empty string if it can’t find it.
- make sure the file is not in your
!path twice and you are getting someone else’s or an old version