The modified program is:
! MExample Program 9-1
! Write a new sequential text file.
! Modify the path to the file to just TEST.DAT
! After running the program, a file TEST.DAT appears with contents
! This is my first file written
! by a program in True Basic!
! To write a new text file you must change the name to TEST2.DAT, for example
! since TEST.DAT may already exist in your directory.
! You may change the path name as necessary.
LET PathName$ = "TEST.DAT" ! remove the old path or the program won't work!
OPEN #1: name PathName$, create new
PRINT "Type a line of text after each ? prompt."
PRINT "Enter a single period to stop the program."
LINE INPUT Reply$
DO until Reply$ = "."
PRINT #1: Reply$
LINE INPUT Reply$
LOOP
PRINT "File "; PathName$; " is written."
CLOSE #1
END