2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -1,9 +1,9 @@
|
|||
generic
|
||||
type Swap_Type is private; -- Generic parameter
|
||||
procedure Generic_Swap(Left : in out Swap_Type; Right : in out Swap_Type);
|
||||
procedure Generic_Swap (Left, Right : in out Swap_Type);
|
||||
|
||||
procedure Generic_Swap(Left : in out Swap_Type; Right : in out Swap_Type) is
|
||||
Temp : Swap_Type := Left;
|
||||
procedure Generic_Swap (Left, Right : in out Swap_Type) is
|
||||
Temp : constant Swap_Type := Left;
|
||||
begin
|
||||
Left := Right;
|
||||
Right := Temp;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
with Generic_Swap;
|
||||
...
|
||||
type T is ...
|
||||
package T_Swap is new Generic_Swap(Swap_Type => T);
|
||||
A,B:T;
|
||||
procedure T_Swap is new Generic_Swap (Swap_Type => T);
|
||||
A, B : T;
|
||||
...
|
||||
T_Swap(A,B);
|
||||
T_Swap (A, B);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue