Index: doc/theses/fangren_yu_MMath/test.adb
===================================================================
--- doc/theses/fangren_yu_MMath/test.adb	(revision d9aee905696bc47431d67240358faaaf12b0ff1f)
+++ doc/theses/fangren_yu_MMath/test.adb	(revision 68c706218a8f56600244dd3a5720da31f8655420)
@@ -16,5 +16,11 @@
 	Function Func( V1 : Integer; V2 : Float ) return Float is begin return Float(V1) + V2; end;
 	
-	Function "-"( L, R : Integer ) return Integer is begin return L + (-R); end; --  prevent infinite recusion
+	subtype Int       is Integer;
+	J : Int;
+	Function "-"( L, R : Int ) return Int is begin Put_Line( "X" ); return Integer(L) + (-Integer(R)); end; --  prevent infinite recusion
+	
+--	duplicate body for "-" declared at line 20
+--	subtype SInt is Integer range -10 .. 10;
+--	Function "-"( L, R : SInt ) return SInt is begin Put_Line( "X" ); return Integer(L) + (-Integer(R)); end; --  prevent infinite recusion
 	
 	i : Integer;
@@ -33,5 +39,5 @@
 	   type T is private;
 	   with function "+"( X, Y: T ) return T;
-	function twice(X : T) return T;
+	function twice( X : T ) return T;
 	
 	function twice( X: T ) return T is
@@ -43,15 +49,24 @@
 	function float_Twice is new Twice( float, "+" => "+" );
 	
-	-- generic units cannot be overloaded
-	-- generic
-	--    type T is private;
-	--    with function "+"( X, Y: T ) return T;
-	-- function twice( X : T; Y : T ) return T;
-	-- 
-	-- function twice( X: T; Y : T ) return T is
-	-- begin
-	--    Put_Line( "XXX" ); return X + X;   -- The formal operator "*".
-	-- end twice;
+--	generic units cannot be overloaded
+--	generic
+--	  type T is private;
+--	  with function "+"( X, Y: T ) return T;
+--	function twice( X : T; Y : T ) return T;
+	
+--	function twice( X: T; Y : T ) return T is
+--	begin
+--	  Put_Line( "XXX" ); return X + X;   -- The formal operator "*".
+--	end twice;
 begin
+   I := 3;
+   I := 7 - 3;
+   	Print( i );
+   F := 3.8;
+   I := 7 - 2;
+   	Print( i );
+   J := 7 - 3;
+   	Print( j );
+   
 	i := Random;
    	Print( i );
@@ -61,8 +76,9 @@
    	Print( s );
 	
-   	Print( Func( 7 ) );
+   	Print( Func( V => 7 ) );
    	Print( Func( 7.5 ) );
    	Print( Func( To_Unbounded_String( "abc" ) ) );
    	Print( Func( 3, 3.5 ) );
+--   	Print( Func( 3, 3 ) );
 	
 	Grind( X => (Re => 1.0, Im => 1.0) );
Index: doc/theses/fangren_yu_MMath/test.swift
===================================================================
--- doc/theses/fangren_yu_MMath/test.swift	(revision d9aee905696bc47431d67240358faaaf12b0ff1f)
+++ doc/theses/fangren_yu_MMath/test.swift	(revision 68c706218a8f56600244dd3a5720da31f8655420)
@@ -1,6 +1,6 @@
 // overloading on return type
-func random() -> Int{ 3; }
-func random() -> String{ "abc"; }
-func random() -> Double{ 3.5; }
+func random() -> Int { 3; }
+func random() -> String { "abc"; }
+func random() -> Double { 3.5; }
 var r1 : Int = random();
 print( r1 );
@@ -10,8 +10,11 @@
 print( r3 );
 
-// overloading functions without parameter names
-func fun( _ x : Int ) -> Int{ 3; }
-func fun( _ x : Int, _ y : Int ) -> Int{ x + y; }
-func fun( _ x : String ) -> String{ "abc"; }
+// function overloading without parameter names
+//func fun( _ x : Int ) { 3; }
+//func fun( _ x : Int, _ y : Int ) { 3; }
+func fun( _ x : Double ) { 3; }
+func fun( _ x : Int ) -> Int { 3; }
+func fun( _ x : Int, _ y : Int ) -> Int { x + y; }
+func fun( _ x : String ) -> String { "abc"; }
 print( fun( 3, 4 ) );
 // print( fun( 3.5 ) ); // no Double -> Int
@@ -19,10 +22,24 @@
 
 // overloading on parameter name
-func foo( x : Int ) -> Int{ 3; }
-func foo( y : Int ) -> Int{ 3; }
+func foo( x : Int ) -> Int { 3; }
+func foo( y : Int ) -> Int { 3; }
 print( foo( x : 3 ) );
 print( foo( y : 3 ) );
 
-// overloading on generics
+// overloading on member name
+class C {
+    func foo() {}
+    func foo( _ x: Int ) -> Int { 3; }
+    func foo( _ x : Double, _ y : Double ) -> Double { x + y; }
+    func foo( _ x : String ) -> String { "abc"; }
+}
+
+let c = C()
+c.foo();
+r1 = c.foo( 3 );
+r3 = c.foo( 3, 3.5 );
+r2 = c.foo( "abc" );
+
+// generic overloading without parameter names
 func bar<T>( _ a : T ) { print( "bar1", a ); }
 func bar<T>( _ a : T, _ b : T ) { print( "bar2", a, b ); }
@@ -33,4 +50,20 @@
 bar( 2, 2.5 );
 
+// generic overloading with parameter names
+func baz( a : Int ) { print( "baz1", a ); }
+func baz<T>( a : T ) { print( "baz1", a ); }
+func baz<T>( a : T, b : T ) { print( "baz2", a, b ); }
+func baz<T,U>( a : T, b : U ) { print( "baz3", a, b ); }
+baz( a : 3 );
+baz( a : 3.5 );
+baz( a : 2, b : 2 );
+baz( a : 2, b : 2.5 );
+func swap<T>( _ a : inout T, _ b : inout T ) { let temp : T = a; a = b; b = temp; }
+var ix = 4, iy = 3;
+swap( &ix, &iy );
+print( ix, iy );
+var fx = 4.5, fy = 3.5;
+swap( &fx, &fy );
+print( fx, fy );
 // Local Variables: //
 // compile-command: "swift test.swift" //
