Jump to content

Talk:QBasic/Non-article discussion

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

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