{: test a compilation error occurs for an external declaration when the
   function has already been declared }

{$d+}
program e022( output );

var
   x,y : real;

function pow(u : real;  v : integer) : real; external;
function pow(a : real;  b : real) : real;          { !!! previously declared }
begin
   pow := exp(ln(a)*b)
end;
function tgamma(a : real) : real; external;         { OK }

begin {e022}

   x := pow( 2.0, 2.0 );
   y := tgamma( 2 );

   writeln( 'fails: previously declared external error not detected' );

end. {e022}

