{: test that accessing a file after eof causes a fatal error }

{$d+}
program d04e( output );

var
   f    : text;
   c    : char;

begin {d04e}

   rewrite(f);
   writeln(f, 'xyz');
   reset(f);
   readln(f,c); {should now be at eof}

   readln(f); {!!! invalid file access}

   writeln( 'fails: readln when at eof error not detected' );
end. { d04e }

