-
Hi,
I wrote a Prog. that read me 10 lines from a file in ( for n = 1 to 10 ... )
Is there any way to read the 11th to 20th line in? ( for n = 10 to 20 dont
work )
He should leave the first 10 lines alone, and only read the 11th to the 20th
file...
thanks.
Kreuzer Michael
-
The code would be n = 11 to 20 and not n = 10 to 20. But could you post the code that you are using? Maybe it is another problem.
Andrew
-
Read the 10 first lines into a dumb variable, then the lines you really want to read:
-----
For i = 1 to 10
Line Input #1, a$
Next
For i = 11 to 20
Line Input #1, a$
Do Your Stuff
Next
Close
-----
Or, if you want to read the rest of the file:
-----
While Not EOF(1)
Line Input #1, a$
Do Your Stuff
Next
Close
-----
[Edited by Juan Carlos Rey on 03-26-2000 at 06:39 PM]
-
A little correction
Juan Carlos' code:
Code:
While Not EOF(1)
Line Input #1, a$
Do Your Stuff
Next
Close
Should be:
Code:
While Not EOF(1)
Line Input #1, a$
Do Your Stuff
Wend
Close
:)
All the best.