Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old May 15th, 2006, 4:34 PM   #1
chepfaust
Programmer
 
chepfaust's Avatar
 
Join Date: Feb 2005
Posts: 62
Rep Power: 4 chepfaust is on a distinguished road
[VB6] Resetting "Line Input"

i am parsing a text file using a do loop with a line input statement.

once that loop is done, i need to make another one to parse for something different.

the problem i am having is that when i open up the second loop, line input continues reading from the text file where i left off with the first loop.

pseudocode:
----------------------------------------------
open file for input as #1
-- do until tempstring = "stuff" or EOF(1)
-- -- line input #1, tempstring
-- loop
-- process tempstring a certain way
close #1

open file for input as #2
-- do until tempstring = "something else" or EOF(2)
-- -- line input #2, tempstring
-- loop
-- process tempstring another way
close #2
----------------------------------------------

how do i make line input start from the top of the file? can i manually trick VB into thinking EOF was reached, therefore starting over?
chepfaust is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:21 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC