fix error and modify corresponding sentences

This commit is contained in:
Wenlei
2012-10-16 01:01:30 +08:00
parent 78ed3f3cbf
commit ca4541b9a5
2 changed files with 2 additions and 2 deletions

4
2.5.md
View File

@@ -28,7 +28,7 @@
变成下图所表示的那样, 椭圆代表函数, 而这些函数并不从属于struct(或者以面向对象的术语来说并不属于class)他们是单独存在于struct外围而非在概念上属于某个struct的。
![](images/2.5.rect_func_without_receive.png?raw=true)
![](images/2.5.rect_func_without_receiver.png?raw=true)
很显然,这样的实现并不优雅,而且从概念上来说一个"形状"的面积应该是"形状"的一个特性,应该是属于这个形状的,就像他的字段一样。
@@ -89,7 +89,7 @@ method的语法如下
图示如下:
![](images/2.5.shapes_func_with_receive_cp.png?raw=true)
![](images/2.5.shapes_func_with_receiver_cp.png?raw=true)
在上例method area() 分别属于Rectangle和Circle 于是他们的 Receiver 就变成了Rectangle 和 Circle, 意思是这个area()方法 是由 Rectangle/Circle 发出的。

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB