diff options
author | Mark Green <mark@antelope.nildram.co.uk> | 2016-01-22 00:54:49 +0000 |
---|---|---|
committer | Mark Green <mark@antelope.nildram.co.uk> | 2016-01-22 00:54:49 +0000 |
commit | 57053bc95d4166a42da8f6d1732dd21a217b073a (patch) | |
tree | 293a7775d4b46313a2ee955691141095653d4044 /zh-cn/lua-cn.html.markdown | |
parent | def04721be506f1c7ff5ddf407f2333999570a89 (diff) | |
parent | 9a5bb286686f5dd4fb743c1bd15ad70a3c6a4a3f (diff) |
Merge remote-tracking branch 'refs/remotes/adambard/master'
Diffstat (limited to 'zh-cn/lua-cn.html.markdown')
-rw-r--r-- | zh-cn/lua-cn.html.markdown | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zh-cn/lua-cn.html.markdown b/zh-cn/lua-cn.html.markdown index 098d0ab5..fc0375f5 100644 --- a/zh-cn/lua-cn.html.markdown +++ b/zh-cn/lua-cn.html.markdown @@ -210,7 +210,7 @@ f2 = {a = 2, b = 3} metafraction = {} function metafraction.__add(f1, f2) - sum = {} + local sum = {} sum.b = f1.b * f2.b sum.a = f1.a * f2.b + f2.a * f1.b return sum @@ -273,7 +273,7 @@ eatenBy = myFavs.animal -- 可以工作!感谢元表 Dog = {} -- 1. function Dog:new() -- 2. - newObj = {sound = 'woof'} -- 3. + local newObj = {sound = 'woof'} -- 3. self.__index = self -- 4. return setmetatable(newObj, self) -- 5. end @@ -307,7 +307,7 @@ mrDog:makeSound() -- 'I say woof' -- 8. LoudDog = Dog:new() -- 1. function LoudDog:makeSound() - s = self.sound .. ' ' -- 2. + local s = self.sound .. ' ' -- 2. print(s .. s .. s) end |