|
-
Mar 28th, 2000, 11:06 PM
#1
Thread Starter
New Member
My program, in one part creates a html document, and in another part reads back in the html code, in order to change filenames, hyperlinks etc.
The code I use to read in the html document is as follows;
Open "C:\results\directory.html" For Input As #1
Do While Not EOF(1) ' Loop until end of file.
Input #1, sfile, Day ' Read data into two variables.
sfileName(count) = sfile
sDate(count) = Day
count = count + 1
Loop
Close #1 ' Close file.
i.e.
Read in two lines of html on each pass into two different variables. This code is then passed into an array, followed by incrementing the counter and going around again until EOF.
The problem is, by about pass 12. (count = 12, this equates to lines 23 and 24)
the first line of code is read in fine (into sfile)
However, my program only reads in the first half of the next line of code into the second variable.
This then causes an error after this, as it reads the second half of this line into the first variable next time around, and as I cant make the file any bigger because of this reason, the program tris to read in nothing into 'Day' variable, giving "input past end of file" error.
Anybody have any ideas why this happens. It seems like it simply runs out of memory, but I viewed memory constriants through task manager, and that aint happening.
Any ideas?
Cheers.
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
|