'' Write out text file:
Open "test.txt" For OutPut As #1
Print #1, "Hello,"
Print #1, ""
Print #1, "this is an example text file,"
Print #1, "generated with the help of FreeBASIC."
Close #1
'' ---
'' Display text file line by line:
Open "test.txt" For Input As #1
Dim As String ln
Do Until( EOF(1) )
Line Input #1, ln
Print ln
Loop
Close #1
Sleep
|