From a9ed242048e779219629eb5ce76b3f09e914421b Mon Sep 17 00:00:00 2001 From: JaySurplus Date: Thu, 5 Jun 2014 01:07:37 -0500 Subject: [PATCH 1/3] First version of Semicolons part in Basics --- source/chapter2/01_The_Basics.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/chapter2/01_The_Basics.md b/source/chapter2/01_The_Basics.md index e7a7bbb3..b4a38e26 100644 --- a/source/chapter2/01_The_Basics.md +++ b/source/chapter2/01_The_Basics.md @@ -124,3 +124,8 @@ Swift 中的注释与C 语言的注释非常相似。单行注释以双正斜杠 通过运用嵌套多行注释,你可以快速方便的注释掉一大段代码,即使这段代码之中已经含有了多行注释块。 +## 分号 +与其他大部分编程语言不同,Swift 并不强制要求你在每条语句的结尾处使用分号(;),当然,你也可以按照你自己的习惯添加分号。有一种情况下必须要用分号,即你打算在同一行内写多条独立的语句: + + let cat = "🐱"; println(cat) + // prints "🐱" From aabbd2c2b13f9484df0615587685c1832a8854e8 Mon Sep 17 00:00:00 2001 From: JaySurplus Date: Thu, 5 Jun 2014 01:21:59 -0500 Subject: [PATCH 2/3] Correct minor bug in Comment --- source/chapter2/01_The_Basics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/chapter2/01_The_Basics.md b/source/chapter2/01_The_Basics.md index b4a38e26..781e4a18 100644 --- a/source/chapter2/01_The_Basics.md +++ b/source/chapter2/01_The_Basics.md @@ -111,7 +111,7 @@ Swift 中的注释与C 语言的注释非常相似。单行注释以双正斜杠 // this is a comment -你也可以进行多行注释,其起始标记为单个正斜杠后跟随一个星号(/*),终止标记为一个星号后跟随单个正斜杠(\*/): +你也可以进行多行注释,其起始标记为单个正斜杠后跟随一个星号(/\*),终止标记为一个星号后跟随单个正斜杠(\*/): /* this is also a comment, but written over multiple lines */ From d83fd2c2d3575f1020335b2f49c92afde73ca7f9 Mon Sep 17 00:00:00 2001 From: JaySurplus Date: Thu, 5 Jun 2014 01:40:21 -0500 Subject: [PATCH 3/3] Working on chapter Classes and Structures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit page 226 - 236 :The Swift Programming Language.epub Still working.. --- source/chapter2/09_Classes_and_Structures.md | 1 + 1 file changed, 1 insertion(+) diff --git a/source/chapter2/09_Classes_and_Structures.md b/source/chapter2/09_Classes_and_Structures.md index e69de29b..cd582e95 100644 --- a/source/chapter2/09_Classes_and_Structures.md +++ b/source/chapter2/09_Classes_and_Structures.md @@ -0,0 +1 @@ +### 类和结构体 \ No newline at end of file