Talk:QBasic/Non-article discussion

Latest comment: 18 years ago by 64.12.116.195 in topic Input a text file?

Input a text file?

edit

does anyone know what the code would be to get a qbasic program to fetch a set of data points from an external document, a .txt or other? --64.12.116.195 02:00, 8 September 2005 (UTC)Reply

yeah to input a text file

edit
open "yourfile.txt" for input as #1
do until eof(1)
input #1, j$
print j$
loop

This opens the file and makes a loop that reads a line, stores it in j$, and prints it. It does this until the end of the file (eof) the eof(1) means end of file= true