Incorrect FILE_TEST Value
QUESTION: If I type this command:
IDL> Print, File_Test("")
1
IDL returns 1, and I expect 0. Why is this? I'm running IDL 5.4 on a Windows machine.
![]()
ANSWER: I provided the following answer on the IDL newsgroup.
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.
To which Paul van Delst had this to add:
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.
But, wait:
IDL> print, !version { x86 linux unix 5.4.1 Jan 16 2001 32 32} IDL> print, file_test('') 0Looks like it may have something to do with the, uh..er, "fluctuating properties" of Windows.
As it happens, this appears to be fixed in IDL 5.5 for Windows.
IDL> print, !version
{ x86 Win32 Windows Microsoft Windows 5.5 Aug 28 2001 32 64}
IDL> print, file_test('')
0
![]()
Copyright © 1997-2001 David W. Fanning
Last Updated 17 December 2001
