make gitbook

This commit is contained in:
numbbbbb
2014-06-12 13:21:55 +08:00
parent 9dfeb7f95c
commit 5a02c1bd84
41 changed files with 264 additions and 263 deletions

View File

@ -21,8 +21,8 @@
<link rel="prev" href="../chapter2/chapter2.html" />
<meta property="og:title" content="基础部分 | 这一次,让中国和世界同步">
<meta property="og:site_name" content="这一次,让中国和世界同步">
<meta property="og:title" content="基础部分 | Swift 编程语言">
<meta property="og:site_name" content="Swift 编程语言">
<meta property="og:type" content="book">
<meta property="og:locale" content="en_US">
@ -46,7 +46,7 @@
<div class="book" data-level="2.1" data-basepath=".." data-revision="1402523087598">
<div class="book" data-level="2.1" data-basepath=".." data-revision="1402550478518">
<div class="book-header">
<!-- Actions Left -->
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
@ -98,7 +98,7 @@
<!-- Title -->
<h1>
<i class="fa fa-spinner fa-spin"></i>
<a href="../" >这一次,让中国和世界同步</a>
<a href="../" >Swift 编程语言</a>
</h1>
</div>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_6473">
<section class="normal" id="section-gitbook_100">
<blockquote>
<p>翻译numbbbbb, lyuka, JaySurplus</p>
@ -923,6 +923,7 @@ let convertedNumber = possibleNumber.toInt()
<p>注意:</p>
<p>使用<code>!</code>来获取一个不存在的可选值会导致运行时错误。使用<code>!</code>来强制解析值之前,一定要确定可选包含一个非<code>nil</code>的值。</p>
</blockquote>
<p><a name="optional_binding"></a></p>
<h3 id="-">可选绑定</h3>
<p>使用<em>可选绑定optional binding</em>来判断可选是否包含值,如果包含就把值赋给一个临时常量或者变量。可选绑定可以用在<code>if</code><code>while</code>语句中来对可选的值进行判断并把值赋给一个常量或者变量。<code>if</code><code>while</code>语句,请参考<a href="05_Control_Flow.html">控制流</a></p>
<p>像下面这样在<code>if</code>语句中写一个可选绑定:</p>