![]() |
Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, Germany |
![]() |
FINDPRO
Find all locations of a procedure in the IDL !PATH
FINDPRO searces for the procedure name (as a .pro or a .sav file) in all
IDL libraries or directories given in the !PATH system variable.
FINDPRO, [ Proc_Name, /NoPrint, DirList = , ProList = ]
Proc_Name - Character string giving the name of the IDL procedure or
function. Do not include the ".pro" extension. If Proc_Name is
omitted, the program will prompt for PROC_NAME. "*" wildcards
are permitted.
/NoPrint - if set, then the file's path is not printed on the screen and
absolutely no error messages are printed on the screen. If not
set, then - since the MESSAGE routine is used - error messages
will be printed but the printing of informational messages
depends on the value of the !Quiet variable.
DirList - The directories in which the file is located are returned in
the keyword as a string array.
If the procedure was found in a VMS text library, then the
full path and name of that library is returned and is prefixed
by an "@" sign as a flag that it is a library, not a directory.
If the procedure is an intrinsic IDL procedure, then the
value of DirList = ['INTRINSIC'].
If the procedure is not found, the value of DirList = [''].
ProList - The list (full pathnames) of procedures found. Useful if you
are looking for the name of a procedure using wildcards.
The order of the names in DirList and ProList is identical to the order
in which the procedure name appears in the !PATH
The system variable !PATH is parsed using EXPAND_PATH into individual
libraries or directories. Each library or directory is then
searched for the procedure name. If not found in !PATH, then the
the name is compared with the list of intrinsic IDL procedures given
by the ROUTINE_INFO function.
(1) Find the procedure CURVEFIT. Assume for this example that the user
also has a copy of the CURVEFIT.PRO procedure in her home directory
on a Unix machine.
IDL> findpro, 'curvefit', DIRLIST=DirList
Procedure curvefit.pro found in directory .
Procedure curvefit.pro found in directory /home/idl/lib/userlib
IDL> help, DirList
DIRLIST STRING = Array(2)
IDL> help, DirList(0), DirList(1)
STRING = '.'
STRING = '/home/idl/lib/userlib'
(2) Find all procedures in one's !path containing the characters "zoom"
IDL> findpro,'*zoom*'
User will be unable to find a path for a native IDL function
or procedure, or for a FORTRAN or C routine added with CALL_EXTERNAL.
Remember that Unix is case sensitive, and most procedures will be in
lower case.
ZPARCHECK, FDECOMP, UNIQ()
Based on code extracted from the GETPRO procedure, J. Parker 1994
Use the intrinsic EXPAND_PATH function W. Landsman Nov. 1994
Use ROUTINE_NAMES() to check for intrinsic procs W. Landsman Jul 95
Added Macintosh, WINDOWS compatibility W. Landsman Sep. 95
Removed spurious first element in PROLIST W. Landsman March 1997
Don't include duplicate directories in !PATH WL May 1997
Converted to IDL V5.0 W. Landsman September 1997
Use ROUTINE_INFO instead of undocumented ROUTINE_NAMES W.L. October 1998
Also check for save sets W. Landsman October 1999
Force lower case check for VMS W. Landsman January 2000
Only return .pro or .sav files in PROLIST W. Landsman January 2002
Force lower case check for .pro and .sav D. Swain September 2002
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]