If you want to save your printout to file, print to the ASCII file sequentially. This is slower and less versatile than binary, but easier to master.
The syntax is quite rigid. The following example contains the basic idea:
OPEN FileName FOR OUTPUT as #17PRINT #17, "HELLO"
CLOSE #17
You can print to file text, numbers, etc. If the file with the sam name as output file already exists, it is replaced by the new one (overwritten). To add rows to an existing file without loosing its contents use OPEN FileName FOR APPEND as #17
You can read input from programs back into the program by the corresponding INPUT statements. Beware that the file has to have the format expected by the INPUT.
The following simple program reads entries from the file FileName and prints it onto the screen, one by one.
OPEN FileName FOR INPUT as #17WHILE NOT EOF(17)
INPUT #17, H$
PRINT H$
WEND
CLOSE #17
PRINT H$
Change INPUT #17, H$ to LINE INPUT #17, H$ to get full text rather than words.