{The index to all of Carl Drott's Pascal examples is at:} { http://drott.cis.drexel.edu/CommandFinder.html } program MakeIn; var word, thename: string; linecount: integer; tohere: text; begin linecount := 1; writeln('what shall I call the file?'); readln(thename); {thename := NewFileName('name the file');} rewrite(tohere, thename); writeln('enter line 1'); readln(word); while word <> '' do begin linecount := linecount + 1; writeln(tohere, word); writeln('enter line ', linecount : 1); readln(word); end; linecount := linecount - 1; writeln('file ', thename, ' created. ', linecount : 1, ' lines'); end.