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

{$d+}
program e023( output );

var
   x,y : real;

function pow(a : real;  b : integer) : real;
begin
   pow := exp(ln(a)*b)
end;

function pow(u : real;  v : real) : real; external; { !!! previously declared }

function tgamma(a : real) : real; external;         { OK }

begin {e023}

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

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

end. {e023}

