Russell Whitaker wrote:
this program:
program writebug; var b1, b2: string (80); f: Text; begin Assign (f, 'ref.txt'); Reset (f); readln (f, b2); while not eof(f) do begin ReadLn (f, b1); if b1 [ 1 ] = '=' then
If b1 is empty, b1[1] is undefined (or contains the value from a previous input).
Try
(b1 <> '') and (b1[1] = '=')
or
IsPrefix ('=', b1)
the former(!) is faster.
Frank