{: verify that a syntax error is detected when the function name is duplicated.}

{$d+}
program e024( output );

function myFunc2(ai : integer) : char;
begin
   writeln('ai is ', ai);
   myFunc2 := '1'
end; {  }

function myFunc1(ai : integer) : char;
begin
   writeln('ai is ', ai);
   myFunc1 := '1'
end; {  }

function myFunc3(ai : integer) : char;
begin
   writeln('ai is ', ai);
   myFunc3 := '1'
end; {  }

function myFunc2(one, two: integer) : char;  {!!! duplicate function name}
begin
   myFunc2 := chr(one + two)
end;

begin
   writeln(myFunc1(0), myFunc2(0), myFunc3(0));  {are the identifiers recognised?}
   writeln(myFunc2(1,2));
   writeln( 'fails: previously declared function error not detected' );

end. {e024}

