Pascal samples. Overloaded routines.


program Demo;

procedure Test(I: Integer; D: Double);
begin
  writeln(I:10, D:10:2);
end;

procedure Test(S: String);
begin
  writeln(S);
end;

procedure Test(D: Double);
begin
  writeln(D:10:2);
end;

begin
  Test('abc');
  Test(12.3);
  Test(5, 12.3);
end.


Copyright © 2006-2017 Alexander Baranovsky. All rights reserved.