File input/output: Difference between revisions
Content added Content deleted
(Dialects of BASIC moved to the BASIC section.) |
(→{{header|BASIC}}: Clarified implementation of BASIC: QuickBASIC.) |
||
Line 793: | Line 793: | ||
=={{header|BASIC}}== |
=={{header|BASIC}}== |
||
⚫ | |||
⚫ | |||
OPEN "OUTPUT.TXT" FOR OUTPUT AS #2 |
|||
DO UNTIL EOF(1) |
|||
LINE INPUT #1, Data$ |
|||
PRINT #2, Data$ |
|||
LOOP |
|||
CLOSE #1 |
|||
CLOSE #2 |
|||
⚫ | |||
==={{header|Applesoft BASIC}}=== |
==={{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. |
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: | Line 1,026: | ||
==={{header|QBasic}}=== |
==={{header|QBasic}}=== |
||
See [[#QuickBASIC|QuickBASIC]]. |
|||
⚫ | |||
==={{header|QuickBASIC}}=== |
|||
⚫ | |||
{{works with|QBasic}} |
|||
⚫ | |||
' File input/output |
|||
⚫ | |||
OPEN "OUTPUT.TXT" FOR OUTPUT AS #2 |
OPEN "OUTPUT.TXT" FOR OUTPUT AS #2 |
||
DO UNTIL EOF(1) |
DO UNTIL EOF(1) |
||
LINE INPUT #1, Data$ |
|||
PRINT #2, Data$ |
|||
LOOP |
LOOP |
||
CLOSE #1 |
CLOSE #1 |
||
CLOSE #2 |
CLOSE #2 |
||
END |
|||
END</syntaxhighlight> |
|||
⚫ | |||
==={{header|RapidQ}}=== |
==={{header|RapidQ}}=== |