George Gwilt schreef:
> 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
> 
Hi,

Here with Smsqe 3.12 and Qpc2 3.32

 > 100 a$='ram1_x_txt'
 > 110 print ftest(a$)
 > 120 print ftest(a$(1 to len(a$)))
 > 140 print ftest(a$(1 to ))
lines 110,120,140 return the same value  -7

Could DIM  the problem ?
François Van Emelen



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

Reply via email to