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 #34286 is a reply to message #34285] Sat, 01 March 2003 16:03 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ulf-Dietrich Braumann (braumann@izbi.uni-leipzig.de) writes:

> Ok, the very scaring solution (which in fact also runs under IDL5.0)
> comes here (just before I go home now ...):

Wow. That could be useful. :-)

Here is the program stripped of some control characters
that got embedded somehow when you sent it:

PRO Tester
Help, Calls=callStack
thisRoutine = (Str_Sep(StrCompress(callStack[0])," "))[0]
callingRoutine = (Str_Sep(StrCompress(callStack[1])," "))[0]
Print, 'In ' + thisRoutine + ', which is called by ' + $
callingRoutine + '.'
thisRoutine = StrLowCase(thisRoutine) + '.pro'
thePath=strmid(StrMid(callStack[0], 0, $
StrPos(callStack[0],thisRoutine)), $
StrPos(StrMid(callStack[0], 0, $
StrPos(callStack[0],thisRoutine)),'<')+1, $
StrLen(StrMid(callStack[0], 0, $
StrPos(callStack[0],thisRoutine))) - $
StrPos(StrMid(callStack[0], 0, $
StrPos(callStack[0],thisRoutine)),'<'))
Print, 'The file "' + thisRoutine + '" is in this directory: ' + thePath
END

Remember (those of you who faithfully update your
IDL version), this requires the obsolete STR_SEP
function. :-)

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: Fri Oct 10 12:09:30 PDT 2025

Total time taken to generate the page: 1.76076 seconds