comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: current directory
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: current directory [message #34297 is a reply to message #34293] Sat, 01 March 2003 07:01 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning (david@dfanning.com) writes:

> But here is some code that gets you as far as you
> can get to:

Whoops! I see I used the archaic STR_SEP routine in
that program. That is an obsolete IDL routine that I
still have on my path for historical reasons. Better
to use the modern STRSPLIT function:

;----------------------------------------------------------- -------
PRO Tester
Help, Calls=callStack
thisRoutine = (StrSplit(StrCompress(callStack[0])," ", /Extract))[0]
callingRoutine = (StrSplit(StrCompress(callStack[1])," ", /Extract))[0]
Print, 'In ' + thisRoutine + ' which is called by ' + callingRoutine +
'.'
thisRoutine = StrLowCase(thisRoutine) + '.pro'
thePath = File_Which(thisRoutine, /Include_Current)
thePath = StrMid(thePath, 0, StrPos(thepath, thisRoutine))
Print, 'The default path to ' + thisRoutine + ' is: ' + thePath
END
;----------------------------------------------------------- -------

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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: dynamically naming variables
Next Topic: dlm returning ptr array and string array

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 12:39:26 PDT 2025

Total time taken to generate the page: 0.32103 seconds