Create a file on magnetic tape: Difference between revisions

Content added Content deleted
(Test: template Task2)
Line 1: Line 1:
{{task|File System Operations}}
{{task2|File System Operations}}
The task is to create a new file called "TAPE.FILE" of any size on Magnetic Tape
The task is to create a new file called "TAPE.FILE" of any size on Magnetic Tape


Line 194: Line 194:
STATUS = CREATE ("tape.file",tape-o,-std-)
STATUS = CREATE ("tape.file",tape-o,-std-)
PRINT STATUS</lang>
PRINT STATUS</lang>
{{Out}}
Output:
<pre>
<pre>
OK
OK
Line 210: Line 210:
The ZX Spectrum does not have file type extensions, so we save as TAPEFILE, rather than TAPE.FILE. We can use any start address, depending on where we want the data to come from. Here we dump the contents of the screen:
The ZX Spectrum does not have file type extensions, so we save as TAPEFILE, rather than TAPE.FILE. We can use any start address, depending on where we want the data to come from. Here we dump the contents of the screen:
<lang zxbasic>SAVE "TAPEFILE" CODE 16384,6912</lang>
<lang zxbasic>SAVE "TAPEFILE" CODE 16384,6912</lang>

{{omit from|AWK|not OO}}
{{omit from|AWK|not OO}}
{{omit from|BASIC|not OO}}
{{omit from|BASIC|not OO}}