25 lines
554 B
Text
25 lines
554 B
Text
' FB 1.05.0 Win64
|
|
|
|
Open "input.txt" For Input As #1
|
|
Dim line_ As String
|
|
Dim count As Integer = 0
|
|
While Not Eof(1)
|
|
Line Input #1, line_ '' read each line
|
|
count += 1
|
|
If count = 7 Then
|
|
line_ = Trim(line_, Any !" \t") '' remove any leading or trailing spaces or tabs
|
|
If line_ = "" Then
|
|
Print "The 7th line is empty"
|
|
Else
|
|
Print "The 7th line is : "; line_
|
|
End If
|
|
Exit While
|
|
End If
|
|
Wend
|
|
If count < 7 Then
|
|
Print "There are only"; count; " lines in the file"
|
|
End If
|
|
Close #1
|
|
Print
|
|
Print "Press any key to quit"
|
|
Sleep
|