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

Home » Public Forums » archive » Re: Unsatisfactory 'file_test()' behavior
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: Unsatisfactory 'file_test()' behavior [message #28433] Mon, 17 December 2001 07:23 Go to next message
Paul van Delst is currently offline  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 #28434 is a reply to message #28433] Mon, 17 December 2001 07:01 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
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. IDL is frequently used to solve this
type of cutting-edge problem.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Unsatisfactory 'file_test()' behavior [message #28563 is a reply to message #28433] Tue, 18 December 2001 08:09 Go to previous message
Dick Jackson is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: XML and IDL?
Next Topic: David Stern Leaves RSI

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

Current Time: Wed Oct 08 19:13:46 PDT 2025

Total time taken to generate the page: 0.00466 seconds