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

Home » Public Forums » archive » Re: IDL Bug? (Re: include files in IDL programs)
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
Re: IDL Bug? (Re: include files in IDL programs) [message #22496] Fri, 17 November 2000 00:00
dsreyn is currently offline  dsreyn
Messages: 10
Registered: December 1999
Junior Member
In article <MPG.147f134c4803b032989c87@news.frii.com>,
davidf@dfanning.com (David Fanning) writes:
> Doug Reynolds (dsreyn@ll.mit.edu) writes:
>
>> Agreed. However, since the Unix world allows file names to mix upper and
>> lower case, I believe this should be documented. The information on pp. 52-53
>> of the IDL 5.4 "Using IDL" manual makes no mention of case restrictions,
>> which implicitly suggests that anything goes.
>
> I looked up "automatic compilation" in the on-line help.
> Here is what I find:
>
> ************************************************************ *********
> Automatic Execution
>
> IDL automatically compiles and executes a user-written function or procedure
> when it is first referenced if:
>
> 1. The source code of the function is in the current working directory or
> in a directory in the IDL search path defined by the system variable !PATH.
> 2. The name of the file containing the function is the same as the
> function name suffixed by .pro or .sav. Under UNIX, the suffix should be in
> lowercase letters.
>
> Note - IDL is case-insensitive. However, for some operating systems, IDL only
> checks for the lowercase filename based on the name of the procedure or
> function. We recommend that all filenames be named with lowercase.
> ************************************************************ ******************

Well, that's certainly clear enough. It seems odd that they don't bother
to mention this in the printed manuals.

>>> It does this *specifically* so these programs will run on UNIX machines.
>>
>> I'm not sure what you mean here. In the case I presented, the effect it
>> has is that the routine does *not* run.
>
> I mean that in a case-sensitive OS, IDL would have no hope
> of finding filenames unless some convention were used. The
> convention it uses (the most sensible, it seems to me) is
> that filenames are in lowercase characters.

OK, now I see what you meant.

Doug
Re: IDL Bug? (Re: include files in IDL programs) [message #22500 is a reply to message #22496] Fri, 17 November 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Doug Reynolds (dsreyn@ll.mit.edu) writes:

> Agreed. However, since the Unix world allows file names to mix upper and
> lower case, I believe this should be documented. The information on pp. 52-53
> of the IDL 5.4 "Using IDL" manual makes no mention of case restrictions,
> which implicitly suggests that anything goes.

I looked up "automatic compilation" in the on-line help.
Here is what I find:

************************************************************ *********
Automatic Execution

IDL automatically compiles and executes a user-written function or procedure
when it is first referenced if:

1. The source code of the function is in the current working directory or
in a directory in the IDL search path defined by the system variable !PATH.
2. The name of the file containing the function is the same as the
function name suffixed by .pro or .sav. Under UNIX, the suffix should be in
lowercase letters.

Note - IDL is case-insensitive. However, for some operating systems, IDL only
checks for the lowercase filename based on the name of the procedure or
function. We recommend that all filenames be named with lowercase.
************************************************************ ******************

>> It does this *specifically* so these programs will run on UNIX machines.
>
> I'm not sure what you mean here. In the case I presented, the effect it
> has is that the routine does *not* run.

I mean that in a case-sensitive OS, IDL would have no hope
of finding filenames unless some convention were used. The
convention it uses (the most sensible, it seems to me) is
that filenames are in lowercase characters.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: IDL Bug? (Re: include files in IDL programs) [message #22501 is a reply to message #22496] Fri, 17 November 2000 00:00 Go to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
Doug Reynolds wrote:
>
> makes no mention of case restrictions,
> which implicitly suggests that anything goes.

Lack of explicit mention is not the same as implicit suggestion. If the
law says you can't kill a person by shooting, it does not imply that you
can starve him to death.

Cheers,
Pavel
Re: IDL Bug? (Re: include files in IDL programs) [message #22505 is a reply to message #22496] Fri, 17 November 2000 00:00 Go to previous message
dsreyn is currently offline  dsreyn
Messages: 10
Registered: December 1999
Junior Member
In article <MPG.147f025db9b7f15f989c85@news.frii.com>,
davidf@dfanning.com (David Fanning) writes:
> Doug Reynolds (dsreyn@ll.mit.edu) writes:
>
>> It turns out that this problem isn't unique to structure definitions - the
>> Solaris version of IDL doesn't match routine names containing uppercase
>> letters. For example, I defined two routines called searchTest.pro and
>> searchtest.pro:
>
> No, any time IDL is looking for file names automatically,
> it always assumes all lowercase characters.

Agreed. However, since the Unix world allows file names to mix upper and
lower case, I believe this should be documented. The information on pp. 52-53
of the IDL 5.4 "Using IDL" manual makes no mention of case restrictions,
which implicitly suggests that anything goes.

> It does this *specifically* so these programs will run on UNIX machines.

I'm not sure what you mean here. In the case I presented, the effect it
has is that the routine does *not* run.

Doug
Re: IDL Bug? (Re: include files in IDL programs) [message #22508 is a reply to message #22496] Fri, 17 November 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Doug Reynolds (dsreyn@ll.mit.edu) writes:

> It turns out that this problem isn't unique to structure definitions - the
> Solaris version of IDL doesn't match routine names containing uppercase
> letters. For example, I defined two routines called searchTest.pro and
> searchtest.pro:

No, any time IDL is looking for file names automatically,
it always assumes all lowercase characters. It does this
*specifically* so these programs will run on UNIX machines.

If you hope to write programs that run in a cross-platform
environment, you always use lowercase characters and give
the files three letter extensions when you name them.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL Shapiro-Wilks test ?
Next Topic: Re: compile all files in current path

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

Current Time: Wed Oct 08 18:40:15 PDT 2025

Total time taken to generate the page: 0.00634 seconds