RosettaCodeData/Task/Generic-swap/Ada/generic-swap-1.ada
2016-12-05 22:15:40 +01:00

10 lines
274 B
Ada

generic
type Swap_Type is private; -- Generic parameter
procedure Generic_Swap (Left, Right : in out Swap_Type);
procedure Generic_Swap (Left, Right : in out Swap_Type) is
Temp : constant Swap_Type := Left;
begin
Left := Right;
Right := Temp;
end Generic_Swap;