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

{$d+}
program d035( output );

var
   f : text;
   i : integer;
begin
   rewrite( f ); { open for writing }
   get( f );
   writeln( 'fails: get from file opened for writing' );
end. { d035 }

