例: Line Input # statement

' Display the contents of c:¥config.sys a line at a time.

Dim text As String, fileNum As Integer
fileNum% = FreeFile()
Open "c:¥config.sys" For Input As fileNum%
Do While Not EOF(fileNum%)
   Line Input #fileNum%, text$ 
   Print text$          ' Prints one line of config.sys
Loop
Close fileNum%