Create a file on magnetic tape: Difference between revisions

Content added Content deleted
No edit summary
(Add Factor)
Line 133: Line 133:
end.
end.
</lang>
</lang>

=={{header|Factor}}==
<lang factor>USING: io.encodings.ascii io.files kernel system ;

"Hello from Rosetta Code!"
os windows? "tape.file" "/dev/tape" ?
ascii set-file-contents</lang>

=={{header|Fortran}}==
=={{header|Fortran}}==
Fortran performs reads and writes to some device, without caring much about the precise nature of the device: card reader/punch, paper tape reader/punch, keyboard, display console, and of course magnetic tape. Sequential input or output is normal, but random access by record number is also possible, though the interface between the Fortran program and the device may not support such attempts, as with a card reader or a display screen. There are also special statements, such as REWIND and BACKSPACE, and ENDFILE. The file OPEN statement will specify such matters as record length and block size and so all is in place for dealing with magnetic tapes...
Fortran performs reads and writes to some device, without caring much about the precise nature of the device: card reader/punch, paper tape reader/punch, keyboard, display console, and of course magnetic tape. Sequential input or output is normal, but random access by record number is also possible, though the interface between the Fortran program and the device may not support such attempts, as with a card reader or a display screen. There are also special statements, such as REWIND and BACKSPACE, and ENDFILE. The file OPEN statement will specify such matters as record length and block size and so all is in place for dealing with magnetic tapes...