The program is:

! Write a text file consisting of lines of characters. A user specifies the file name

! and then enters text from the keyboard. Signify the end of text by entering a

! period as the first and only character in a line. Do not write this period on the

! file.

 

! Test your program by writing the preceding lines to a file named FIRST.TXT

 

 

 

! You may change the path name as necessary.

LET PathName$ = "FIRST.TXT"

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$ ! type the required lines, and stop with "."

LINE INPUT Reply$

LOOP

PRINT "File "; PathName$; " is written."

CLOSE #1

END

The text file FIRST.TXT contains:

Write a text file consisting of lines of characters. A user specifies the file

name

and then enters text from the keyboard. Signify the end of text by entering a

period as the first and only character in a line. Do not write this period on t

he

file.


Clearly there is a problem with line length.