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');?
Printable View
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');?
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
thank you