Re: Two new tools [message #11427 is a reply to message #11291] |
Sun, 05 April 1998 00:00  |
R. Bauer
Messages: 137 Registered: November 1996
|
Senior Member |
|
|
<HTML>
Martin Schultz wrote:
<BLOCKQUOTE TYPE=CITE>Howdy,
<P> today I finally got around improving my concept of
displaying help
<BR>information on self-written (and library!) routines. Please find
<BR>attached
<BR> function routine_name.pro - which returns
the name of the caller
<BR>routine
<BR> </BLOCKQUOTE>
Hi Martin,
<P>this function is in Ray Sterners lib too and will be called with whocalledme,dir,file.
<P>IDL> whocalledme,/help
<BR> Returns to calling routine its parent's directory and name.
<BR> whocalledme, dir, file
<BR> dir = Source directory of parent routine.
out
<BR> file = name of parent routine. &a mp;nbsp; &a mp;nbsp;
out
<BR> Keywords:
<BR> LINE=n Line number just after parent's last call.
<BR> Notes: It can be useful for a routine to know
<BR> what routine called it.
<BR> See also: whoami.
<P>IDL> whoami,/help
<BR> Returns to the calling routine its directory and name.
<BR> whoami, dir, file
<BR> dir = Source directory of calling routine.
out
<BR> file = name of calling routine. &a mp;nbsp; &a mp;nbsp;
out
<BR> Notes: It can be useful for a routine to know
<BR> what directory it is located in. This allows
<BR> it to reference auxiliary files in the same
<BR> directory without needed any special environmental
<BR> variables defined. The file name returned here is
<BR> less important since it could always be hardwired
<BR> into the calling routine itself, but this technique
<BR> allows this to be avoided for more reusable code.
<P>Reimar
<PRE>--
R.Bauer
Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de</PRE>
</HTML>
|
|
|