FORMAT Example10 CLEAR SCREEN
20 CREATE "test.txt",0
30 PRINT "Created file: ";
40 CAT "*.txt";NAMES
50 ASSIGN @File TO "test.txt";FORMAT ON !FORMAT ON means it's an ordinary ASCII file.
60 OUTPUT @File;"This is a test"
70 PRINT "Output a string to the file."
80 RESET @File
90 PRINT "Reset the file to the beginning and read string."
100 ENTER @File;Test$
110 PRINT "The string read was: ";Test$
120 ASSIGN @File TO *
130 PURGE "test.txt"
140 PRINT "File purged."
150 END
|