I don't think that this is necessarily a problem with FTEST, but more to  
do with the different way in which dimensioned strings are handled (see my  
SBASIC/SuperBASIC Reference Manual!!)

You have to be so careful due to the variations in the different  
implementations of SuperBASIC/

On most implications k$(1 TO )) would be equivalent to k$(1 to 40) - ie.  
with extra spaces after the "Win_j".
On SMSQ/e and Minerva it defaults to k$(1 to LEN(k$))

However, this does not show why this creates a problem - seems to be a bug  
in the code for FTEST itself.

Rich

On Mon, 28 Aug 2006 14:43:01 +0100, George Gwilt <[EMAIL PROTECTED]> wrote:

> FTEST(a$) should return 0 if a$ is the name of an existing file that
> can be opened or the name of a directory, but should return a
> negative number otherwise. I was surprised to see that the following
> program produced 0 instead of -7.
>
> 1000  DIM k$(40)
> 1010  k$="win_j"
> 1020  PRINT FTEST(k$(1 TO ))
>
> If line 1000 is omitted the correct answer, -7, is given. If line
> 1020 is changed to PRINT FTEST(k$), again the correct result is given.
>
> Clearly something is wrong with FTEST. However, users of TURBO will
> be glad to know that when compiled all the versions of the program
> given above produce a correct -7.
>
> George
> _______________________________________________
> QL-Users Mailing List
> http://www.q-v-d.demon.co.uk/smsqe.htm
>
>



-- 
Rich Mellor
RWAP Services
URL:http://www.rwapsoftware.co.uk
URL:http://www.rwapadventures.com
URL:http://www.rwapservices.co.uk
URL:http://www.internetbusinessangels.com

_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to