I'm working on some code I haven't looked at for a while, which uses the Salford function FEXISTS@. It seems (to me) to be behaving somewhat differently to the way it is documented. The problem rang a bell so I searched the forum, and the one reference I can find to this function is here:
http://forums.silverfrost.com/viewtopic.php?t=864
although the focus in this topic is split between apparent problems with both FEXISTS@ and OPEN, and the questions never got resolved.
So, according to the documentation:
'FEXISTS@ returns a logical value which is .TRUE. if the name supplied in PATH is that of a file which does exist, or is a wildcard which matches one file only. It returns .FALSE. if such a file does not exist, or if an error occurs in which case ERROR_CODE returns a non-zero system error code.'
My concern is with the case where a file does not exist, when FEXISTS@ returns FALSE (as it should) and an error code of 2 (as I believe it should not). I believe that if a file does not exist, the returns should be FALSE and 0. FALSE and non-zero should be returned only if something goes wrong.
Does something here need to be rectified?
Andy