Some Problems with IDL [message #76015] |
Sun, 15 May 2011 15:31  |
Konstantinos
Messages: 29 Registered: April 2011
|
Junior Member |
|
|
Dear users
I have some problems using IDL and i would like to ask you for your
invaluable help.
I run IDL 7.1 under windows vista
1. Each time i run any program i have the message
File does not exist: 'File name'
The file 'File name' exists AND the program runs perfectly. Any idea
why I get this message??
|
|
|
Re: Some Problems with IDL [message #76130 is a reply to message #76015] |
Mon, 16 May 2011 16:26  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Konstantinos writes:
> The program is saved as heinz.pro
Ah, that explains it! I think if you name
your programs properly, this problem will
disappear.
http://www.idlcoyote.com/tips/namefiles.html
The Workbench "run" buttons don't really run
anything. What they do is compile all the program
modules in the file, then they try to "run" the
program module that has the same name as the
file. Had you named your files in the conventional
way, this could (under a limited set of circumstances)
actually work properly for you. But, since you give
your files names that are different from the last
program module in the file, the run button is always
"looking" for this file and failing to find it.
You can safely ignore the error messages (although
God knows they are sure to get tedious!), use the
.RUN command from the IDL command line, or simply
give your files the right names and all will be
well with the world! :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|
Re: Some Problems with IDL [message #76140 is a reply to message #76015] |
Mon, 16 May 2011 12:34  |
Heinz Stege
Messages: 189 Registered: January 2003
|
Senior Member |
|
|
On Mon, 16 May 2011 11:06:33 -0700 (PDT), Konstantinos wrote:
> I save the program under the ...\IDLWorkspace71 directory with the
> name howdy.
>
Konstantinos, did you save the program as "howdy" or as "howdy.pro"?
IDL programs are usually stored with the ".pro" extension. I see
exactly your error message, if I omit the file extension.
HTH, Heinz
|
|
|
Re: Some Problems with IDL [message #76144 is a reply to message #76015] |
Mon, 16 May 2011 12:03  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Paul van Delst writes:
> But others here (e.g. Windows users) are much more Workspace-aware than me, so narrowing the problem down probably
> helped (I hope).
>
> Any takers out there....?
Well, I've noticed a LOT of buttons on the Workspace
are flakey and/or non-functional. Part of the ease-of-use
campaign, I assumed. (Fewer things to learn.)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Some Problems with IDL [message #76146 is a reply to message #76015] |
Mon, 16 May 2011 11:49  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Hello,
Konstantinos wrote:
> Paul
>
> Lets supose that i write your program (or any other program)
>
> pro howdy
> print, 'hello world!'
> end
>
> I save the program under the ...\IDLWorkspace71 directory with the
> name howdy.
>
> Now if i give the command from the command line
>
> ENVI> howdy
> hello world
> ENVI>
>
>
> As you see i dont have any error message.
>
> NOW IF i press the F8 button (=start execution) then the result is
>
> hello world!
> File does not exist: 'howdy.pro'.
>
> Interesting.. It gives this message only when i press F8 OR CTRL+F8
> (=compile the active source code).
>
> Any Idea??
Well, I don't use ENVI, or the Workspace (which I assume is similar between IDL and ENVI since the latter is now
apparently the development vehicle for the former), so no. Sorry.
But others here (e.g. Windows users) are much more Workspace-aware than me, so narrowing the problem down probably
helped (I hope).
Any takers out there....?
cheers,
paulv
|
|
|
Re: Some Problems with IDL [message #76148 is a reply to message #76015] |
Mon, 16 May 2011 11:06  |
Konstantinos
Messages: 29 Registered: April 2011
|
Junior Member |
|
|
Paul
Lets supose that i write your program (or any other program)
pro howdy
print, 'hello world!'
end
I save the program under the ...\IDLWorkspace71 directory with the
name howdy.
Now if i give the command from the command line
ENVI> howdy
hello world
ENVI>
As you see i dont have any error message.
NOW IF i press the F8 button (=start execution) then the result is
hello world!
File does not exist: 'howdy.pro'.
Interesting.. It gives this message only when i press F8 OR CTRL+F8
(=compile the active source code).
Any Idea??
Thank you in advance
|
|
|
Re: Some Problems with IDL [message #76149 is a reply to message #76015] |
Mon, 16 May 2011 10:47  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Konstantinos wrote:
> Dear users
>
> I have some problems using IDL and i would like to ask you for your
> invaluable help.
> I run IDL 7.1 under windows vista
>
> 1. Each time i run any program i have the message
> File does not exist: 'File name'
When you say "run any program", do you mean *any* program. E.g. if you created a procedure to simply print something, i.e.
$ cat > howdy.pro
pro howdy
print, 'hello world!'
end
^D
and then ran it in IDL, e.g.
$ idl
IDL> howdy
% Compiled module: HOWDY.
hello world!
IDL>
just doing this you would get a "File does not exist: 'File name'" message?
> The file 'File name' exists AND the program runs perfectly. Any idea
> why I get this message??
So you would get the output "hello world" along with the "File does not exist: 'File name'" message?
And is "File name" the actual string, or is it a variable containing the name of a file?
cheers,
paulv
|
|
|
Re: Some Problems with IDL [message #76150 is a reply to message #76015] |
Mon, 16 May 2011 10:31  |
Konstantinos
Messages: 29 Registered: April 2011
|
Junior Member |
|
|
Mike,
Yes giving both commands i get a blank line. That means that i dont
have a startup file.
1.You think that this is the reason that every time i got the message
"File does not exist: 'File name'" ?
2. Should i forget about this "problem" (=message) and continue my
work? OR there is an easy way to get rid of this?
Thank You in advance
|
|
|
Re: Some Problems with IDL [message #76152 is a reply to message #76015] |
Mon, 16 May 2011 10:17  |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 5/16/11 10:48 AM, Konstantinos wrote:
> Mike,
>
> giving the command
>
> print, pref_get('IDL_STARTUP')
>
> i get nothing, blank line, probably that means that i have not a
> startup file. And now what?
>
> Thank Uyou
>
And "print, getenv('IDL_STARTUP')" was also blank? Then yes, you don't
have a startup file.
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL, A Guide to Learning IDL: http://modernidl.idldev.com
Research Mathematician
Tech-X Corporation
|
|
|
|