CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 1999
    Location
    US
    Posts
    34

    How to read previous line?

    I am reading a text file using following code

    Line input #1, strTextLine



    Then I analyze the line content.
    Sometime if the text file has errors i.e it missing some lines. I report the problem and
    then comeback to the loop that reads the lines.
    Unfortunetly I am one line off now. Is it possible
    to go one line back?
    I am using VB5.
    thks!
    Alex.



  2. #2

    Re: How to read previous line?

    There may be a better solution than this, but the first thing that comes to mind is to save each line into a string array, and then access the previous element.

    Charles Zimmerman
    http://www.freevbcode.com


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured