Skip to content

Commit b3ef454

Browse files
committed
correct the wrong "half-closed loop"
1 parent 2bd4a3a commit b3ef454

Some content is hidden

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

42 files changed

+82
-82
lines changed

chapter1/01_swift.html

+2-2
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="1402676386943">
49+
<div class="book" data-level="1.1" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_4">
590+
<section class="normal" id="section-gitbook_83">
591591

592592
<blockquote>
593593
<p>翻译:numbbbbb</p>

chapter1/02_a_swift_tour.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="1.2" data-basepath=".." data-revision="1402676386943">
49+
<div class="book" data-level="1.2" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_6">
590+
<section class="normal" id="section-gitbook_85">
591591

592592
<blockquote>
593593
<p>翻译:numbbbbb

chapter1/chapter1.html

+2-2
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="1402676386943">
49+
<div class="book" data-level="1" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_8">
590+
<section class="normal" id="section-gitbook_87">
591591

592592
<h1 id="-swift">欢迎使用 Swift</h1>
593593
<p>在本章中您将了解 Swift 的特性和开发历史,并对 Swift 有一个初步的了解。</p>

chapter2/01_The_Basics.html

+2-2
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="1402676386943">
49+
<div class="book" data-level="2.1" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_15">
590+
<section class="normal" id="section-gitbook_90">
591591

592592
<blockquote>
593593
<p>翻译:numbbbbb, lyuka, JaySurplus</p>

chapter2/02_Basic_Operators.html

+2-2
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="1402676386943">
49+
<div class="book" data-level="2.2" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_32">
590+
<section class="normal" id="section-gitbook_111">
591591

592592
<blockquote>
593593
<p>翻译:xielingwang</p>

chapter2/03_Strings_and_Characters.html

+2-2
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="1402676386943">
49+
<div class="book" data-level="2.3" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_11">
590+
<section class="normal" id="section-gitbook_92">
591591

592592
<blockquote>
593593
<p>翻译:wh1100717</p>

chapter2/04_Collection_Types.html

+2-2
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="1402676386943">
49+
<div class="book" data-level="2.4" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_13">
590+
<section class="normal" id="section-gitbook_94">
591591

592592
<blockquote>
593593
<p>翻译:zqp</p>

chapter2/05_Control_Flow.html

+3-3
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="1402676386943">
49+
<div class="book" data-level="2.5" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_17">
590+
<section class="normal" id="section-gitbook_96">
591591

592592
<blockquote>
593593
<p>翻译:vclwei, coverxit, NicePiao</p>
@@ -643,7 +643,7 @@ <h3 id="for-in">For-In</h3>
643643
println(&quot;\(base) to the power of \(power) is \(answer)&quot;)
644644
// 输出 &quot;3 to the power of 10 is 59049&quot;
645645
</code></pre>
646-
<p>这个例子计算 base 这个数的 power 次幂(本例中,是<code>3</code><code>10</code>次幂),从<code>1</code><code>3</code><code>0</code>次幂)开始做<code>3</code>的乘法, 进行<code>10</code>次,使用<code>1</code><code>10</code>的半闭区间循环。这个计算并不需要知道每一次循环中计数器具体的值,只需要执行了正确的循环次数即可。下划线符号<code>_</code>(替代循环中的变量)能够忽略具体的值,并且不提供循环遍历时对值的访问。</p>
646+
<p>这个例子计算 base 这个数的 power 次幂(本例中,是<code>3</code><code>10</code>次幂),从<code>1</code><code>3</code><code>0</code>次幂)开始做<code>3</code>的乘法, 进行<code>10</code>次,使用<code>1</code><code>10</code>的闭区间循环。这个计算并不需要知道每一次循环中计数器具体的值,只需要执行了正确的循环次数即可。下划线符号<code>_</code>(替代循环中的变量)能够忽略具体的值,并且不提供循环遍历时对值的访问。</p>
647647
<p>使用<code>for-in</code>遍历一个数组所有元素:</p>
648648
<pre><code class="lang-swift">let names = [&quot;Anna&quot;, &quot;Alex&quot;, &quot;Brian&quot;, &quot;Jack&quot;]
649649
for name in names {

chapter2/06_Functions.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.6" data-basepath=".." data-revision="1402676386943">
49+
<div class="book" data-level="2.6" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_19">
590+
<section class="normal" id="section-gitbook_98">
591591

592592
<blockquote>
593593
<p>翻译:honghaoz</p>

chapter2/07_Closures.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.7" data-basepath=".." data-revision="1402676386943">
49+
<div class="book" data-level="2.7" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_21">
590+
<section class="normal" id="section-gitbook_100">
591591

592592
<blockquote>
593593
<p>翻译:wh1100717</p>

chapter2/08_Enumerations.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.8" data-basepath=".." data-revision="1402676386943">
49+
<div class="book" data-level="2.8" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_23">
590+
<section class="normal" id="section-gitbook_102">
591591

592592
<blockquote>
593593
<p>翻译:yankuangshi</p>

chapter2/09_Classes_and_Structures.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.9" data-basepath=".." data-revision="1402676386943">
49+
<div class="book" data-level="2.9" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_25">
590+
<section class="normal" id="section-gitbook_104">
591591

592592
<blockquote>
593593
<p>翻译:JaySurplus</p>

chapter2/10_Properties.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.10" data-basepath=".." data-revision="1402676386943">
49+
<div class="book" data-level="2.10" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_26">
590+
<section class="normal" id="section-gitbook_105">
591591

592592
<blockquote>
593593
<p>翻译:shinyzhu</p>

chapter2/11_Methods.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.11" data-basepath=".." data-revision="1402676386943">
49+
<div class="book" data-level="2.11" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_28">
590+
<section class="normal" id="section-gitbook_107">
591591

592592
<blockquote>
593593
<p>翻译:pp-prog</p>

chapter2/12_Subscripts.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.12" data-basepath=".." data-revision="1402676386943">
49+
<div class="book" data-level="2.12" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_30">
590+
<section class="normal" id="section-gitbook_109">
591591

592592
<blockquote>
593593
<p>翻译:siemenliu</p>

chapter2/13_Inheritance.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.13" data-basepath=".." data-revision="1402676386943">
49+
<div class="book" data-level="2.13" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_9">
590+
<section class="normal" id="section-gitbook_88">
591591

592592
<blockquote>
593593
<p>翻译:Hawstein</p>

chapter2/14_Initialization.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.14" data-basepath=".." data-revision="1402676386943">
49+
<div class="book" data-level="2.14" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_34">
590+
<section class="normal" id="section-gitbook_113">
591591

592592
<blockquote>
593593
<p>翻译:lifedim</p>

chapter2/15_Deinitialization.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.15" data-basepath=".." data-revision="1402676386943">
49+
<div class="book" data-level="2.15" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_36">
590+
<section class="normal" id="section-gitbook_115">
591591

592592
<blockquote>
593593
<p>翻译:bruce0505</p>

chapter2/16_Automatic_Reference_Counting.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.16" data-basepath=".." data-revision="1402676386943">
49+
<div class="book" data-level="2.16" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_38">
590+
<section class="normal" id="section-gitbook_117">
591591

592592
<blockquote>
593593
<p>翻译:TimothyYe</p>

chapter2/17_Optional_Chaining.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.17" data-basepath=".." data-revision="1402676386943">
49+
<div class="book" data-level="2.17" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_40">
590+
<section class="normal" id="section-gitbook_119">
591591

592592
<blockquote>
593593
<p>翻译:Jasonbroker</p>

chapter2/18_Type_Casting.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848

49-
<div class="book" data-level="2.18" data-basepath=".." data-revision="1402676386943">
49+
<div class="book" data-level="2.18" data-basepath=".." data-revision="1402677669306">
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>
@@ -587,7 +587,7 @@ <h1>
587587

588588
<div class="page-inner">
589589

590-
<section class="normal" id="section-gitbook_42">
590+
<section class="normal" id="section-gitbook_121">
591591

592592
<blockquote>
593593
<p>翻译:xiehurricane</p>

0 commit comments

Comments
 (0)