ファイルストリームから一行分読み込む。指定されたストリームから文字列を変数に読み込む。 ラインフィードは自動的に取り去られる。
書式:
file Input #stream
,
data
stream
オープンコマンドでオープンされたストリーム番号
data文字列を格納すべき変数。
例:
' open a text file
open "myfile.txt" for input as 1
' read until end of file
while not eof( 1 )
' read a line from the file and print it
file input #1,
data$
print data$
end while
' close the file
close( 1 )
参照: file
output #