|
-
January 8th, 2000, 07:20 AM
#1
input error
I have a program which reads info from text files using the input command. The problem is that if there is no info in the file the program crashes. How can i stop this?
-
January 8th, 2000, 08:15 AM
#2
-
January 8th, 2000, 02:39 PM
#3
Re: input error
Thats all very well but dont error handlers let the prog crash any way, simply allowing u to give a differnt message as it does so. Besides, precisely how do i do this??
-
January 8th, 2000, 04:00 PM
#4
Re: input error
Use:
'This forces the code to continue regardless of an error
on error resume next
then use err.number to determine the type of error.
'This turns off error handling
on error goto 0
If you can search your help for the following
on error goto
on error resume next
err
I hope this helps
-
January 10th, 2000, 04:03 PM
#5
Re: input error
Hi
Check FileLen(Filename). If its zero then don't read the file.
Hope that helps.
Nandini
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|