File input/output: Difference between revisions

→‎{{header|BASIC}}: Clarified implementation of BASIC: QuickBASIC.
(Dialects of BASIC moved to the BASIC section.)
(→‎{{header|BASIC}}: Clarified implementation of BASIC: QuickBASIC.)
Line 793:
 
=={{header|BASIC}}==
{{works with|QuickBasic|4.5}}
<syntaxhighlight lang="qbasic"> OPEN "INPUT.TXT" FOR INPUT AS #1
OPEN "OUTPUT.TXT" FOR OUTPUT AS #2
DO UNTIL EOF(1)
LINE INPUT #1, Data$
PRINT #2, Data$
LOOP
CLOSE #1
CLOSE #2
SYSTEM</syntaxhighlight>
 
==={{header|Applesoft BASIC}}===
This is only meant to copy a sequential text file. It is very unlikely that this works copying a random access text file.
Line 1,037 ⟶ 1,026:
 
==={{header|QBasic}}===
See [[#QuickBASIC|QuickBASIC]].
<syntaxhighlight lang="qbasic">OPEN "INPUT.TXT" FOR INPUT AS #1
 
==={{header|QuickBASIC}}===
{{works with|QuickBasic|4.5}}
{{works with|QBasic}}
<syntaxhighlight lang="qbasic">OPEN "INPUT.TXT" FOR INPUT AS #1
' File input/output
<syntaxhighlight lang="qbasic"> OPEN "INPUT.TXT" FOR INPUT AS #1
OPEN "OUTPUT.TXT" FOR OUTPUT AS #2
DO UNTIL EOF(1)
LINE INPUT #1, DATAData$
PRINT #2, DATAData$
LOOP
CLOSE #1
CLOSE #2
END
END</syntaxhighlight>
SYSTEM</syntaxhighlight>
 
==={{header|RapidQ}}===
512

edits