On 13/06/2011 08:25, Wolfgang Lenerz wrote:
Hi,

check whether the file exists :

result=ftest(p$)

result=0 if the file exists, if not you get different error codes.

HTH

Wolfgang

Nb I think ftest is a tk2 function...


In a short SBASIC program a filename P$ is to be entered, and then it
proceeds to print
Copy_N P$, Ser$ where Ser$ is preset to the correct format for the printer.

If the filename was entered wrongly, then the program exits with an
error message. How can I ensure either that the name entered is valid,
or error trap to revert to the entry screen with the appropriate message
to try again.

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


_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm
Many thanks, Wolfgang, that is another little glitch sorted thanks. QL manual gives the error codes, but they seem to be negative values. I've not done much programming for some time now, just tying to tweaking old programs when their faults annoy me enough!.

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

Reply via email to