
{: test that writing to a file opened for reading causes a fatal error }

{$d+}
program d032( output );

var
   f :  text;
begin
   rewrite( f );
   reset( f );
   writeln( f, 'A' );
   writeln( 'fails: write to file opened for reading' );
end. { d032 }

