Input loop is part of Short Circuit's Console Program Basics selection.
Task

Read from a text stream either word-by-word or line-by-line until the stream runs out of data.

The stream will have an unknown amount of data on it.




' FB 1.05.0 Win64
 
Dim line_ As String  ' line is a keyword
Open "input.txt" For Input As #1 
 
While Not Eof(1)
  Input #1, line_
  Print line_  ' echo to the console
Wend
 
Close #1
Print
Print "Press any key to quit"
Sleep