Write entire file: Difference between revisions
Content deleted Content added
No edit summary |
Write entire file in various BASIC dialents |
||
Line 180: | Line 180: | ||
Binary: |
Binary: |
||
<lang freebasic>BSAVE mem TO filename$ SIZE n</lang> |
<lang freebasic>BSAVE mem TO filename$ SIZE n</lang> |
||
=={{header|BASIC}}== |
|||
==={{header|BASIC256}}=== |
|||
<lang freebasic>f = freefile |
|||
open f, "output.txt" |
|||
write f, "This string is to be written to the file" |
|||
close f</lang> |
|||
==={{header|QBasic}}=== |
|||
{{works with|FreeBASIC}} |
|||
<lang QBasic>f = FREEFILE |
|||
OPEN "output.txt" FOR OUTPUT AS #f |
|||
PRINT #f, "This string is to be written to the file" |
|||
CLOSE #</lang> |
|||
==={{header|Run BASIC}}=== |
|||
{{works with|QBasic}} |
|||
{{works with|FreeBASIC}} |
|||
<lang runbasic>open "output.txt" for output as #1 |
|||
print #1, "This string is to be written to the file" |
|||
close #1</lang> |
|||
==={{header|True BASIC}}=== |
|||
<lang qbasic>OPEN #1: NAME "output.txt", CREATE NEWOLD |
|||
PRINT #1: "This string is to be written to the file" |
|||
CLOSE #1 |
|||
END</lang> |
|||
=={{header|BBC BASIC}}== |
=={{header|BBC BASIC}}== |