366 Storing data on tape The data in the last example was read into an array in the computer. It could then be edited and the corrected version could be rerecorded on cassette. The process of recording the data on the cassette consists of three steps: open the file for output, write out the data and then close the file. The example program records 20 entries back to tape from the array in memory. 200 X=OPENOUT("NEWNAMES") 210 FOR Y=1 TO 20 220 PRINT#X,A$(Y) 230 NEXT Y 240 CLOSE#X 250 END Note that line 200 will make the computer issue the message as it did when saving a BASIC program.
RECORD then RETURN The CLOSE# statement will record any remaining data and then stop the recorder automatically. Recording single characters on tape Single characters (bytes) can be placed on tape using the command BPUT# . The following program stores the alphabet on tape. Note that the letter A has an ASCII value of 65 and the letter Z has an ASCII value of 90. 100 X=OPENOUT("ALPHABET") 110 FOR D=65 TO 90 120 BPUT#X,D 130 NEXT D 140 CLOSE#X 150 END File names File names on cassettes can be up to ten characters long and can include any character except space.