Results 1 to 3 of 3

Thread: reading lines

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Posts
    2

    Angry reading lines

    I'm having trouble reading complete lines from open files in vb. I can open the file for input fine but I want to read a line (with random whitespaces in it) from a file into a string. Does vb have something equivalent to cin.getline(line, '\n');?

  2. #2
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    Code:
    open "myfile.txt" for input as #1
    Do while not EOF(1)
       Line input #1, a$
       ' do something with the line of text
    Loop
    close #1

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Posts
    2

    Smile thats it

    thank you

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