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

Home » Public Forums » archive » capital letters in file names?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
capital letters in file names? [message #56789] Fri, 16 November 2007 16:11 Go to next message
jdmcbr@gmail.com is currently offline  jdmcbr@gmail.com
Messages: 2
Registered: November 2007
Junior Member
Hello,

Is anyone aware of there being an issue with IDL recognizing .pro
files in a directory as being associated with IDL if there are capital
letters in the file name? I got a lot of "Variable is undefined"
messages when I tried to use functions I had written within other
programs. This even occurred when I had already compiled those
functions. On a couple of occasions, if I restarted IDL and compiled
everything right at the start, it worked, but on some occasions it did
not. Finally, I removed all capital letters from filenames, and
everything has run a couple of times without issues. Is it just the
capital letters (in which case I will just avoid that in the future)
or is there another issue?

Thanks,
James
Re: capital letters in file names? [message #56858 is a reply to message #56789] Sun, 18 November 2007 19:19 Go to previous messageGo to next message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
Thank you for clearing that up, David. It was late, I was tired. The
easiest seems to me to just use lower case filenames for everything -
and you can (of course) use any (mix of) case for calling the function/
pro.

David Fanning wrote:
> The capitalization of the procedure or function is
> entirely irrelevant. IDL is case insensitive. The
> name of the file should be spelled with lowercase
> letters if you expect IDL to find it automatically
> (as you should). If you always compile your procedures
> and functions before you use them, then (really!) you
> should be using another language than IDL, as there is
> ABSOLUTELY no reason to do this.
>
> You should even name your Windows files with lowercase
> letters, IMHO, since you never know when you might find
> yourself loaning them to someone with a machine different
> from yours. This can cause an enormous amount of heartache
> before you figure out what the problem is.
>
> http://www.dfanning.com/tips/namefiles.html
Re: capital letters in file names? [message #56864 is a reply to message #56789] Sun, 18 November 2007 09:39 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
hradilv writes:

> If you are using a *nix OS and you do, say, .comp test, IDL will look
> for test.pro which must contain a procedure or function called
> "test" (same capitalization). If the file name is Test.pro and the
> procedure in it is "test", then you call "Test", IDL will compile
> Test.pro creating a procedure called "test", but it won't be able to
> find "Test"
>
> Clear as mud?

And possibly misleading, as well. :-)

> If you are using a *nix OS and you do, say, .comp test, IDL will look
> for test.pro which must contain a procedure or function called
> "test" (same capitalization).

The capitalization of the procedure or function is
entirely irrelevant. IDL is case insensitive. The
name of the file should be spelled with lowercase
letters if you expect IDL to find it automatically
(as you should). If you always compile your procedures
and functions before you use them, then (really!) you
should be using another language than IDL, as there is
ABSOLUTELY no reason to do this.

You should even name your Windows files with lowercase
letters, IMHO, since you never know when you might find
yourself loaning them to someone with a machine different
from yours. This can cause an enormous amount of heartache
before you figure out what the problem is.

http://www.dfanning.com/tips/namefiles.html

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.")
Re: capital letters in file names? [message #56877 is a reply to message #56789] Sat, 17 November 2007 10:12 Go to previous messageGo to next message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Nov 16, 6:11 pm, "jdm...@gmail.com" <jdm...@gmail.com> wrote:
> Hello,
>
> Is anyone aware of there being an issue with IDL recognizing .pro
> files in a directory as being associated with IDL if there are capital
> letters in the file name? I got a lot of "Variable is undefined"
> messages when I tried to use functions I had written within other
> programs. This even occurred when I had already compiled those
> functions. On a couple of occasions, if I restarted IDL and compiled
> everything right at the start, it worked, but on some occasions it did
> not. Finally, I removed all capital letters from filenames, and
> everything has run a couple of times without issues. Is it just the
> capital letters (in which case I will just avoid that in the future)
> or is there another issue?
>
> Thanks,
> James

You should tell us what OS you are using.

If you are using a *nix OS and you do, say, .comp test, IDL will look
for test.pro which must contain a procedure or function called
"test" (same capitalization). If the file name is Test.pro and the
procedure in it is "test", then you call "Test", IDL will compile
Test.pro creating a procedure called "test", but it won't be able to
find "Test"

Clear as mud?
Re: capital letters in file names? [message #56981 is a reply to message #56858] Fri, 23 November 2007 18:01 Go to previous message
jdmcbr@gmail.com is currently offline  jdmcbr@gmail.com
Messages: 2
Registered: November 2007
Junior Member
Thank you all for the clarification about what was going on. I will
make sure to stick with lower case from now on.

James
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Is it possible to draw 2 plots in the same IDLgrPLot object ?
Next Topic: Using IDL shell in crontab

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

Current Time: Sun Oct 12 00:39:25 PDT 2025

Total time taken to generate the page: 0.01351 seconds