LINE INPUT [ # hStream , ] sVariable
Reads an entire line of text from the text stream Stream into a String sVariable.
If the stream hStream is not specified, then the standard input is used.
The entire line is read, except the end-of-line delimiter.
The end-of-line delimiter can be defined with the Stream.EndOfLine property. It is gb.Unix by default, which selects a single Chr$(10) character.
![]() | Do not use this instruction to read from binary files, because you will lose the linefeed characters. Use READ instead. |
DIM hFile AS Stream DIM sOneLine AS String ' Print a file to standard output hFile = OPEN "/etc/hosts" FOR INPUT WHILE NOT Eof(hFile) LINE INPUT #hFile, sOneLine PRINT sOneLine WEND CLOSE #hFile