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

Home » Public Forums » archive » Re: current directory changes unexpectedly
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 changes unexpectedly [message #69648] Wed, 27 January 2010 06:47 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
simona bellavista writes:

> I start working in idl, I compile and run programs, abruptly it cannot
> find anymore the routines I am working on, I check the current folder
> with
> cd, current=dir
> print, dir
> and I discover the current folder has changed.
>
> I performed several tests trying to reproduce the error intentionally,
> but I have never succeed.

Then I would think the most likely explanation, especially
if you think this is happening randomly, is that one of the
programs you are running changes directories with a CD
command. I have programs, for example, that save the
current directory and change to some other directory:

CD, CURRENT=thisDir, 'someotherDirectory'

Before I exit the program, I change back:

CD, thisDir

If such a program stopped in the middle of the program for
some reason (I forgot to add a Catch error handler to the
program, for example), then I would be in some directory
I didn't expect to be in.

I can imagine a program that even forgets to switch back
to the starting directory, perhaps by returning in an
unusual location or from a Catch error handler. That
would also produce the result you are seeing.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: idl/gdl/strmatch
Next Topic: How to link one point after the other by an arrow in a graph(in PLOT)?

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

Current Time: Sun Nov 30 13:46:10 PST 2025

Total time taken to generate the page: 0.00241 seconds