Re: Unsatisfactory 'file_test()' behavior [message #28433] |
Mon, 17 December 2001 07:23  |
Paul van Delst
Messages: 364 Registered: March 1997
|
Senior Member |
|
|
David Fanning wrote:
>
> Matt Feinstein (mfein@clark.net) writes:
>
>> If I do
>>
>> e = file_test('')
>>
>> that is, test for the existence of a file whose name is a zero-length
>> string, I get e = 1. This is not good ! (Using IDL v5.4 WinNT 4.0).
>
> The reasons for this are obscure, but have to due
> with the quantum properties of vacuums. It turns
> out that you can never say that a particular
> unit of space is "empty", since quantum fluctuations
> cause physical elements to appear, however
> briefly.
But, you can only claim this if you can quantify the non-emptiness in some way. IDL apparently
can. And the answer is '1'. That's pretty cool.
paulv
p.s.:
IDL> print, !version
{ x86 linux unix 5.4.1 Jan 16 2001 32 32}
IDL> print, file_test('')
0
Looks like it may have something to do with the, uh..er, "fluctuating properties" of Windows.
--
Paul van Delst Religious and cultural
CIMSS @ NOAA/NCEP purity is a fundamentalist
Ph: (301)763-8000 x7274 fantasy
Fax:(301)763-8545 V.S.Naipaul
|
|
|
|
Re: Unsatisfactory 'file_test()' behavior [message #28563 is a reply to message #28433] |
Tue, 18 December 2001 08:09  |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
"Paul van Delst" <paul.vandelst@noaa.gov> wrote in message
news:3C1E0DEA.7E4D534E@noaa.gov...
>> Matt Feinstein (mfein@clark.net) writes:
>>
>>> If I do
>>>
>>> e = file_test('')
>>>
>>> that is, test for the existence of a file whose name is a zero-length
>>> string, I get e = 1. This is not good ! (Using IDL v5.4 WinNT 4.0).
> p.s.:
>
> IDL> print, !version
> { x86 linux unix 5.4.1 Jan 16 2001 32 32}
> IDL> print, file_test('')
> 0
>
> Looks like it may have something to do with the, uh..er, "fluctuating
properties" of Windows.
Fluctuating, indeed!...
=====
IDL Version 5.4 (Win32 x86). (c) 2000, Research Systems, Inc.
IDL> print, file_test('')
1
=====
IDL Version 5.5, Microsoft Windows (Win32 x86). (c) 2001, Research Systems,
Inc.
IDL> print, file_test('')
0
=====
Perhaps this is considered to be fixed now.
--
-Dick
Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
|
|
|