In the place where it is written while (s) do begin writes:
Cannot convert string to boolean.
I am writing from a book, the following code is indicated in the book:
var f: text; s: string; begin assign (f,'dop/file1.txt'); rewrite (f); readln (s); while (s) do begin writeln (f,s); readln (s); end; close (f); end. And there the task is to make a program that opens the file and records the entered information from the keyboard. I wrote:
program TeleFon; var f: text; s: string; begin assign (f,'dop/phone.txt'); reset (f); while not eof (f) do begin readln (f,s); writeln (s); end; close (f); append (f); readln (s); while (s) do begin writeln (f,s); readln (s); end; close (f) end. Help, what's wrong?
while (s <> '') do- Igor