-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c6fdd4
commit 3a72c40
Showing
4 changed files
with
45 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
# CHANGELOG | ||
**仅包含语言LK的变化** | ||
|
||
## 0.1.3 | ||
|
||
|
||
## 0.1.2 | ||
- `Table`索引从`0`开始 | ||
- 去除以`'''` `"""`构造长String,当前仅支持``` `` ```构造 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Rectangle = {'area': 0, 'length': 0, 'breadth': 0} | ||
|
||
fn Rectangle:new(o,length,breadth) { | ||
o = o or {} | ||
setmetatable(o, self) | ||
self.__index = self | ||
self.length = length or 0 | ||
self.breadth = breadth or 0 | ||
self.area = length*breadth; | ||
rt o | ||
} | ||
|
||
fn Rectangle:printArea() { | ||
print("矩形面积为 ", self.area) | ||
} | ||
|
||
shy rect = Rectangle:new(nil, 10, 20) | ||
rect:printArea() |