944,204 Members | Top Members by Rank

Ad:
Oct 1st, 2005
0

"Input past end of File" error #62

Expand Post »
Hello, I am still a student and this is an assignment, I'm not neccessarily looking for a solution but simpy an answer to guide me in troubleshooting this logical (I think) problem.

I designed a simple program to seperate text data into usable fields in accordance with my assignment.

I was given a simple .dat file with 50 or so records in the following format:

Professor Frink Huntley 085205552223

I designed and subsequently wrote (in QBASIC) a program. I have solved most of the syntactical errors and now I am solving the logical ones and I am stuck on Error #62 "Input past end of file"

It is located in my getInput SUB, second line after importing variables.

LINE INPUT #1, InputRecord

I have searched this site and other sites within Google range but have not found anything relevant to my problem.

I will furnish more code upon any request, I guess I didn't here because it's still a work in progress and I'm stuck on this error.

Thanks for any reply.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ironfeliks is offline Offline
3 posts
since Sep 2005
Oct 2nd, 2005
0

Re: "Input past end of File" error #62

If I can remember well, that error means you reached the end-of-file and are trying to get more data from it. Check EOF before to get data and adjust your logic accordingly.
Reputation Points: 12
Solved Threads: 4
Junior Poster
Alvein is offline Offline
104 posts
since Jul 2005
Oct 2nd, 2005
0

Re: "Input past end of File" error #62

Thank you for your response, I should have added a few things such as my little project program follows a standard form:

declare constants
declare variables
start program
CALL houseKeeping
CALL getInput

DO WHILE NOT EOF(1)
CALL mainLoop
LOOP

END

I have several SUB's. Obviously I have a housekeeping SUB and a getInput SUB. The houseKeeping SUB points to the location of the data file (which is a simple non-delimeted txt file with two empty lines for the eof marker.) The getInput SUB is were I'm haveing the problem.

When I run the program, it freezes on the first line of the getInput SUB:

LINE INPUT #1, InputRecord

Should I simply post the entire program with the data base? would that be of use to anyone? I've tried all other resources available to me but I am stuck here at this problem.

Thanks again.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ironfeliks is offline Offline
3 posts
since Sep 2005
Nov 8th, 2005
0

Re: "Input past end of File" error #62

I can offer help but i dont understand the problem. And i will like you send the code for me to see. I look forward to hearing from you.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
albash is offline Offline
3 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Legacy and Other Languages Forum Timeline: Basic Package
Next Thread in Legacy and Other Languages Forum Timeline: Experimenting with Boo





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC