Skip to content

Commit 01663b6

Browse files
committed
make gitbook
1 parent aac02aa commit 01663b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+761
-651
lines changed

chapter1/01_swift.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="1.1" data-basepath=".." data-revision="1402617910282">
49+
<div class="book" data-level="1.1" data-basepath=".." data-revision="1402634093001">
5050
<div class="book-header">
5151
<!-- Actions Left -->
5252
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>

chapter1/02_a_swift_tour.html

Lines changed: 417 additions & 374 deletions
Large diffs are not rendered by default.

chapter1/chapter1.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="1" data-basepath=".." data-revision="1402617910282">
49+
<div class="book" data-level="1" data-basepath=".." data-revision="1402634093001">
5050
<div class="book-header">
5151
<!-- Actions Left -->
5252
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>

chapter2/01_The_Basics.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.1" data-basepath=".." data-revision="1402617910282">
49+
<div class="book" data-level="2.1" data-basepath=".." data-revision="1402634093001">
5050
<div class="book-header">
5151
<!-- Actions Left -->
5252
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>

chapter2/02_Basic_Operators.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.2" data-basepath=".." data-revision="1402617910282">
49+
<div class="book" data-level="2.2" data-basepath=".." data-revision="1402634093001">
5050
<div class="book-header">
5151
<!-- Actions Left -->
5252
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
@@ -748,7 +748,7 @@ <h2 id="-">比较运算</h2>
748748
<p>所有标准 C 语言中的比较运算都可以在 Swift 中使用。</p>
749749
<ul>
750750
<li>等于(<code>a == b</code></li>
751-
<li>不等于(<code>a= b</code></li>
751+
<li>不等于(<code>a != b</code></li>
752752
<li>大于(<code>a &gt; b</code></li>
753753
<li>小于(<code>a &lt; b</code></li>
754754
<li>大于等于(<code>a &gt;= b</code></li>
@@ -778,7 +778,7 @@ <h2 id="-">比较运算</h2>
778778
<p>关于<code>if</code>语句,请看<a href="05_Control_Flow.html">控制流</a></p>
779779
<p><a name="ternary_conditional_operator"></a></p>
780780
<h2 id="-ternary-conditional-operator-">三元条件运算(Ternary Conditional Operator)</h2>
781-
<p>三元条件运算的特殊在于它是有三个操作数的运算符,它的原型是<code>问题答案1答案2</code>。它简洁地表达根据<code>问题</code>成立与否作出二选一的操作。如果<code>问题</code>成立,返回<code>答案1</code>的结果; 如果不成立,返回<code>答案2</code>的结果。</p>
781+
<p>三元条件运算的特殊在于它是有三个操作数的运算符,它的原型是 <code>问题 ? 答案1 : 答案2</code>。它简洁地表达根据<code>问题</code>成立与否作出二选一的操作。如果<code>问题</code>成立,返回<code>答案1</code>的结果; 如果不成立,返回<code>答案2</code>的结果。</p>
782782
<p>使用三元条件运算简化了以下代码:</p>
783783
<pre><code class="lang-swift">if question: {
784784
answer1
@@ -855,7 +855,7 @@ <h3 id="-">逻辑非</h3>
855855
}
856856
// 输出 &quot;ACCESS DENIED&quot;
857857
</code></pre>
858-
<p><code>ifallowedEntry</code>语句可以读作 &quot;如果 非 alowed entry。&quot;,接下一行代码只有在如果 &quot;非 allow entry&quot; 为<code>true</code>,即<code>allowEntry</code><code>false</code>时被执行。</p>
858+
<p><code>if !allowedEntry</code>语句可以读作 &quot;如果 非 alowed entry。&quot;,接下一行代码只有在如果 &quot;非 allow entry&quot; 为<code>true</code>,即<code>allowEntry</code><code>false</code>时被执行。</p>
859859
<p>在示例代码中,小心地选择布尔常量或变量有助于代码的可读性,并且避免使用双重逻辑非运算,或混乱的逻辑语句。</p>
860860
<h3 id="-">逻辑与</h3>
861861
<p>逻辑与(<code>a &amp;&amp; b</code>)表达了只有<code>a</code><code>b</code>的值都为<code>true</code>时,整个表达式的值才会是<code>true</code></p>

chapter2/03_Strings_and_Characters.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.3" data-basepath=".." data-revision="1402617910282">
49+
<div class="book" data-level="2.3" data-basepath=".." data-revision="1402634093001">
5050
<div class="book-header">
5151
<!-- Actions Left -->
5252
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>

chapter2/04_Collection_Types.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.4" data-basepath=".." data-revision="1402617910282">
49+
<div class="book" data-level="2.4" data-basepath=".." data-revision="1402634093001">
5050
<div class="book-header">
5151
<!-- Actions Left -->
5252
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>

chapter2/05_Control_Flow.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.5" data-basepath=".." data-revision="1402617910282">
49+
<div class="book" data-level="2.5" data-basepath=".." data-revision="1402634093001">
5050
<div class="book-header">
5151
<!-- Actions Left -->
5252
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>

0 commit comments

Comments
 (0)