File input/output: Difference between revisions
Added FreeBASIC
m (→{{header|I}}) |
(Added FreeBASIC) |
||
Line 1,064:
end program FileIO</lang>
=={{header|FreeBASIC}}==
<lang freebasic>' FB 1.05.0 Win64
/'
input.txt contains:
The quick brown fox jumps over the lazy dog.
Empty vessels make most noise.
Too many chefs spoil the broth.
A rolling stone gathers no moss.
'/
Open "output.txt" For Output As #1
Open "input.txt" For Input As #2
Dim line_ As String ' note that line is a keyword
While Not Eof(2)
Line Input #2, line_
Print #1, line_
Wend
Close #2
Close #1</lang>
{{out}}
<pre>
output.txt contains:
The quick brown fox jumps over the lazy dog.
Empty vessels make most noise.
Too many chefs spoil the broth.
A rolling stone gathers no moss.
</pre>
=={{header|Frink}}==
|