例: EOF function

' Open a file, print it, and close the file.
Dim text As String, fileNum As Integer
fileNum% = FreeFile()

Open "c:¥config.sys" For Input As fileNum%
Do Until EOF(1)
   Line Input #1, text$
   Print text$
Loop
Close fileNum%