update 03/03

This commit is contained in:
numbbbbb
2014-06-09 21:41:32 +08:00
parent a00d973e61
commit a2cfd75ea0
41 changed files with 286 additions and 73 deletions

View File

@ -46,7 +46,7 @@
<div class="book" data-level="1.1" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="1.1" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_4">
<section class="normal" id="section-gitbook_6">
<h1 id="-swift">关于 Swift</h1>
<p>Swift 是一种新的编程语言,用于编写 iOS 和 OS X 应用。Swift 结合了 C 和 Objective-C 的优点并且不受C的兼容性的限制。Swift 使用安全的编程模式并添加了很多新特性这将使编程更简单扩展性更强也更有趣。除此之外Swift 还支持人见人爱的 Cocoa 和 Cocoa Touch 框架。拥有了这些特性Swift将重新定义软件开发。</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="1.2" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="1.2" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_5">
<section class="normal" id="section-gitbook_7">
<h1 id="swift-">Swift 初见</h1>
<p>本页内容包括:</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="1" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="1" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_6">
<section class="normal" id="section-gitbook_8">
<h1 id="-swift">欢迎使用 Swift</h1>
<p>在本章中您将了解 Swift 的特性和开发历史,并对 Swift 有一个初步的了解。</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.1" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.1" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_8">
<section class="normal" id="section-gitbook_10">
<h1 id="-">基础部分</h1>
<p>Swift 是 iOS 和 OS X 应用开发的一门新语言。然而,如果你有 C 或者 Objective-C 开发经验的话,你会发现 Swift 的很多内容都是你熟悉的。</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.2" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.2" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_30">
<section class="normal" id="section-gitbook_32">
<h1 id="-">基础运算符</h1>
<p>运算符是检查, 改变, 合并值的特殊符号或短语. 例如, 加号 <code>+</code> 把计算两个数的和(如 <code>let i = 1 + 2</code>). 复杂些的运行算包括逻辑与<code>&amp;&amp;</code>(如 <code>if enteredDoorCode &amp;&amp; passedRetinaScan</code>), 还有自增运算符 <code>++i</code> 这样让自身加一的便捷运算.</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.3" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.3" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_9">
<section class="normal" id="section-gitbook_11">
<h1 id="-strings-and-characters-">字符串和字符 (Strings and Characters)</h1>
<p>本页包含内容:</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.4" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.4" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_21">
<section class="normal" id="section-gitbook_23">
<h1 id="-collection-types-">集合类型 (Collection Types)</h1>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.5" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.5" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_22">
<section class="normal" id="section-gitbook_25">
<h1 id="-">控制流</h1>
<p>Swift提供了类似C语言的流程控制结构包括将任务执行多次的<code>for</code><code>while</code>循环,基于特定条件选择执行不同分支的<code>if</code><code>switch</code>语句,还有控制流程跳转到其他代码的<code>break</code><code>continue</code>语句。</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.6" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.6" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_23">
<section class="normal" id="section-gitbook_24">
<h1 id="-functions-">函数Functions</h1>
<p>本页包含内容:</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.7" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.7" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_24">
<section class="normal" id="section-gitbook_26">
<h1 id="-">闭包</h1>
<p>本页内容包含:</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.8" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.8" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_25">
<section class="normal" id="section-gitbook_27">
<h1 id="-">枚举</h1>
<p>本页内容包含:</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.9" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.9" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_26">
<section class="normal" id="section-gitbook_29">
<h3 id="-">类和结构体</h3>
<p>本页包含内容:</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.10" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.10" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_27">
<section class="normal" id="section-gitbook_28">
<h1 id="-properties-">属性 (Properties)</h1>
<p><strong>属性</strong>将值跟特定的类、结构或枚举关联。一种是存储属性,把常量或变量的值作为实例的一部分,一种是计算属性,它计算一个值。计算属性可以用于类、结构和枚举里,存储属性只能用于类和结构。</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.11" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.11" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_28">
<section class="normal" id="section-gitbook_30">
<h1 id="-methods-">方法(Methods)</h1>
<p><strong>方法</strong>是与某些特定类型相关联的功能/函数。类、结构体、枚举都可以定义实例方法;实例方法为指定类型的实例封装了特定的任务与功能。类、结构体、枚举也可以定义类(型)方法(type itself)类型方法与类型自身相关联。类型方法与Objective-C中的类方法(class methods)相似。</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.12" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.12" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_29">
<section class="normal" id="section-gitbook_31">
<h1 id="-subscripts-">下标 (Subscripts)</h1>
<p>下标可以定义在类(Class)、结构体(structures)和枚举(enumerations)这些目标中,可以认为是访问对象、集合或序列的快捷方式。举例来说,用下标访问一个数组(Array)实例中的元素可以这样写 <code>someArray[index]</code> ,访问字典(Dictionary)实例中的元素可以这样写 <code>someDictionary[key]</code>,而不需要再调用实例的某个方法来获得元素的值。</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.13" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.13" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_7">
<section class="normal" id="section-gitbook_9">
<h1 id="-">继承</h1>
<p>一个类可以继承另一个类的方法属性和其它特性。当一个类继承其它类继承类叫子类被继承类叫超类或父类。在Swift中继承是区分「类」与其它类型的一个基本特征。</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.14" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.14" data-basepath=".." data-revision="1402321232917">
<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>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.15" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.15" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_32">
<section class="normal" id="section-gitbook_34">
<h1 id="-">析构过程</h1>
<p>在一个类的实例被释放之前析构函数被立即调用。用关键字deinit来标示析构函数类似于初始化函数用init来标示。析构函数只适用于类类型。</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.16" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.16" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_33">
<section class="normal" id="section-gitbook_35">
<h1 id="-">自动引用计数</h1>
<p>本页包含内容:</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.17" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.17" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_34">
<section class="normal" id="section-gitbook_36">
<h1 id="optional-chaining">Optional Chaining</h1>
<p>可选链Optional Chaining是一种可以请求和调用属性、方法及子脚本的过程它的自判断性体现于请求或调用的目标当前可能为空<code>nil</code>)。如果自判断的目标有值,那么调用就会成功;相反,如果选择的目标为空(<code>nil</code>),则这种调用将返回空(<code>nil</code>)。多次请求或调用可以被链接在一起形成一个链,如果任何一个节点为空(<code>nil</code>)将导致整个链失效。</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.18" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.18" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_35">
<section class="normal" id="section-gitbook_37">
<h1 id="-type-casting-">类型检查Type Casting</h1>
<p>ps为了方便各位检验所以保留了英文可删。

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.19" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.19" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_36">
<section class="normal" id="section-gitbook_38">
<h1 id="-">类型嵌套</h1>
<p>本页包含内容:</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.20" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.20" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_37">
<section class="normal" id="section-gitbook_39">
<h1 id="-extensions-">扩展Extensions</h1>
<hr>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.21" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.21" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_39">
<section class="normal" id="section-gitbook_41">
<h1 id="-">协议</h1>
<p><code>Protocol(协议)</code>定义了用于完成某项任务或功能的方法,属性等,它不具备任何功能的细节实现,只用来<strong>统一</strong>方法,属性等的名称和其类型.(<em>译者注: 其他语言中也把 <code>Portocol</code> 称为 <code>Interface(接口)</code></em> ).协议可以被<code>类,枚举,结构体</code>采纳并实现,任意满足了协议要求的<code>类,枚举,结构体</code>被称之为<code>协议遵循者</code>.</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.22" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.22" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_40">
<section class="normal" id="section-gitbook_42">
<h1 id="-">泛型</h1>
<hr>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.23" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2.23" data-basepath=".." data-revision="1402321232917">
<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>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="2" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_44">
<section class="normal" id="section-gitbook_46">
<h1 id="swift-">Swift 教程</h1>
<p>本章介绍了 Swift 的各种特性及其使用方法,是全书的核心部分。</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="3.1" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="3.1" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_46">
<section class="normal" id="section-gitbook_48">
<h1 id="-">关于语言附注</h1>
<p>本书的这一节描述了Swift编程语言的形式语法。这里描述的语法是为了帮助您更详细的了解该语言而不是让您直接实现一个解析器或编译器。</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="3.2" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="3.2" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_50">
<section class="normal" id="section-gitbook_53">
<h1 id="-">语法结构</h1>
<p>本页包含内容:</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="3.3" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="3.3" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,6 +587,219 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_49">
<h1 id="-types-">类型Types</h1>
<hr>
<p>本页包含内容:</p>
<ul>
<li>类型标注Type Annotation</li>
<li>类型标识符Type Identifier</li>
<li>元组类型Tuple Type</li>
<li>函数类型Function Type</li>
<li>数组类型Array Type</li>
<li>可选类型Optional Type</li>
<li>隐式解析可选类型Implicitly Unwrapped Optional Type</li>
<li>协议合成类型Protocol Composition Type</li>
<li>元类型Metatype Type</li>
<li>类型继承子句Type Inheritance Clause</li>
<li>类型推断Type Inference</li>
</ul>
<p>Swift语言存在两种类型命名型类型和复合型类型。<em>命名型类型</em>是指定义时可以给定名字的类型。命名型类型包括类、结构体、枚举和协议。比如,一个用户定义的类<code>MyClass</code>的实例拥有类型<code>MyClass</code>。除了用户定义的命名型类型Swift标准库也定义了很多常用的命名型类型包括那些表示数组、字典和可选值的类型。</p>
<p>那些通常被其它语言认为是基本或初级的数据型类型Data types——比如表示数字、字符和字符串——实际上就是命名型类型Swift标准库是使用结构体定义和实现它们的。因为它们是命名型类型因此你可以按照“扩展和扩展声明”章节里讨论的那样声明一个扩展来增加它们的行为以适应你程序的需求。</p>
<p><em>复合型类型</em>是没有名字的类型它由Swift本身定义。Swift存在两种复合型类型函数类型和元组类型。一个复合型类型可以包含命名型类型和其它复合型类型。例如元组类型<code>(Int, (Int, Int))</code>包含两个元素:第一个是命名型类型<code>Int</code>,第二个是另一个复合型类型<code>(Int, Int)</code>.</p>
<p>本节讨论Swift语言本身定义的类型并描述Swift中的类型推断行为。</p>
<blockquote>
<p>类型的语法:
<em>type</em><em>array-type</em> | <em>function-type</em> | <em>type-identifier</em> | <em>tuple-type</em> | <em>optional-type</em> | <em>implicitly-unwrapped-optional-type</em> | protocol-composition-type | metatype-type</p>
</blockquote>
<h2 id="-">类型标注</h2>
<p>类型标注显式地指定一个变量或表达式的值。类型标注始于冒号<code>:</code>终于类型,比如下面两个例子:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">let</span> someTuple(Double, Double) = (<span class="hljs-number">3.14159</span>, <span class="hljs-number">2.71828</span>)
func someFunction(a: Int){ <span class="hljs-comment">/* ... */</span> }
</code></pre>
<p>在第一个例子中,表达式<code>someTuple</code>的类型被指定为<code>(Double, Double)</code>。在第二个例子中,函数<code>someFunction</code>的参数<code>a</code>的类型被指定为<code>Int</code></p>
<p>类型标注可以在类型之前包含一个类型特性type attributes的可选列表。</p>
<blockquote>
<p>类型标注的语法:
<em>type-annotation</em> → :<em>attributes</em>[opt] <em>type</em></p>
</blockquote>
<h2 id="-">类型标识符</h2>
<p>类型标识符引用命名型类型或者是命名型/复合型类型的别名。</p>
<p>大多数情况下,类型标识符引用的是同名的命名型类型。例如类型标识符<code>Int</code>引用命名型类型<code>Int</code>,同样,类型标识符<code>Dictionary&lt;String, Int&gt;</code>引用命名型类型<code>Dictionary&lt;String, Int&gt;</code></p>
<p>在两种情况下类型标识符引用的不是同名的类型。情况一,类型标识符引用的是命名型/复合型类型的类型别名。比如,在下面的例子中,类型标识符使用<code>Point</code>来引用元组<code>(Int, Int)</code></p>
<pre><code class="lang-javascript">typealias Point = (Int, Int)
<span class="hljs-keyword">let</span> origin: Point = (<span class="hljs-number">0</span>, <span class="hljs-number">0</span>)
</code></pre>
<p>情况二类型标识符使用dot(<code>.</code>)语法来表示在其它模块modules或其它类型嵌套内声明的命名型类型。例如下面例子中的类型标识符引用在<code>ExampleModule</code>模块中声明的命名型类型<code>MyType</code></p>
<pre><code class="lang-javascript"><span class="hljs-keyword">var</span> someValue: ExampleModule.MyType
</code></pre>
<blockquote>
<p>类型标识符的语法:
<em>type-identifier</em><em>type-name generic-argument-clause</em>[opt] | <em>type-name generic-argument-clause</em>[opt].<em>type-identifier</em>
<em>type-name</em><em>identifier</em></p>
</blockquote>
<h2 id="-">元组类型</h2>
<p>元组类型使用逗号隔开并使用括号括起来的0个或多个类型组成的列表。</p>
<p>你可以使用元组类型作为一个函数的返回类型,这样就可以使函数返回多个值。你也可以命名元组类型中的元素,然后用这些名字来引用每个元素的值。元素的名字由一个标识符和<code>:</code>组成。“函数和多返回值”章节里有一个展示上述特性的例子。</p>
<p><code>void</code>是空元组类型<code>()</code>的别名。如果括号内只有一个元素,那么该类型就是括号内元素的类型。比如,<code>(Int)</code>的类型是<code>Int</code>而不是<code>(Int)</code>。所以,只有当元组类型包含两个元素以上时才可以标记元组元素。</p>
<blockquote>
<p>元组类型语法:
<em>tuple</em> → (<em>tuple-type-body</em>[opt])
<em>tuple-type-body</em><em>tuple-type-element-list</em> ...[opt]
<em>tuple-type-element-list</em><em>tuple-type-element</em> | <em>tuple-type-element</em>, <em>tuple-type-element-list</em>
<em>tuple-type-element</em><em>attributes</em>[opt] <strong>inout</strong> [opt] <em>type</em> | <strong>inout</strong> [opt] <em>element-name type-annotation</em>
<em>element-name</em><em>identifier</em></p>
</blockquote>
<h2 id="-">函数类型</h2>
<p>函数类型表示一个函数、方法或闭包的类型,它由一个参数类型和返回值类型组成,中间用箭头<code>-&gt;</code>隔开:</p>
<ul>
<li><code>parameter type</code> -&gt; <code>return type</code></li>
</ul>
<p>由于 <em>参数类型</em><em>返回值类型</em> 可以是元组类型,所以函数类型可以让函数与方法支持多参数与多返回值。</p>
<p>你可以对函数类型应用带有参数类型<code>()</code>并返回表达式类型的<code>auto_closure</code>属性(见类型属性章节)。一个自动闭包函数捕获特定表达式上的隐式闭包而非表达式本身。下面的例子使用<code>auto_closure</code>属性来定义一个很简单的assert函数</p>
<pre><code class="lang-javascript">func simpleAssert(condition: @auto_closure () -&gt; Bool, message: <span class="hljs-built_in">String</span>){
<span class="hljs-keyword">if</span> !condition(){
println(message)
}
}
<span class="hljs-keyword">let</span> testNumber = <span class="hljs-number">5</span>
simpleAssert(testNumber % <span class="hljs-number">2</span> == <span class="hljs-number">0</span>, <span class="hljs-string">"testNumber isn't an even number."</span>)
<span class="hljs-comment">// prints "testNumber isn't an even number."</span>
</code></pre>
<p>函数类型可以拥有一个可变长参数作为参数类型中的最后一个参数。从语法角度上讲,可变长参数由一个基础类型名字和<code>...</code>组成,如<code>Int...</code>。可变长参数被认为是一个包含了基础类型元素的数组。即<code>Int...</code>就是<code>Int[]</code>。关于使用可变长参数的例子,见章节“可变长参数”。</p>
<p>为了指定一个<code>in-out</code>参数,可以在参数类型前加<code>inout</code>前缀。但是你不可以对可变长参数或返回值类型使用<code>inout</code>。关于In-Out参数的讨论见章节In-Out参数部分。</p>
<p>柯里化函数curried function的类型相当于一个嵌套函数类型。例如下面的柯里化函数<code>addTwoNumber()()</code>的类型是<code>Int -&gt; Int -&gt; Int</code></p>
<pre><code class="lang-javascript">func addTwoNumbers(a: Int)(b: Int) -&gt; Int{
<span class="hljs-keyword">return</span> a + b
}
addTwoNumbers(<span class="hljs-number">4</span>)(<span class="hljs-number">5</span>) <span class="hljs-comment">// returns 9</span>
</code></pre>
<p>柯里化函数的函数类型从右向左组成一组。例如,函数类型<code>Int -&gt; Int -&gt; Int</code>可以被理解为<code>Int -&gt; (Int -&gt; Int)</code>——也就是说,一个函数传入一个<code>Int</code>然后输出作为另一个函数的输入,然后又返回一个<code>Int</code>。例如,你可以使用如下嵌套函数来重写柯里化函数<code>addTwoNumbers()()</code></p>
<pre><code class="lang-javascript">func addTwoNumbers(a: Int) -&gt; (Int -&gt; Int){
func addTheSecondNumber(b: Int) -&gt; Int{
<span class="hljs-keyword">return</span> a + b
}
<span class="hljs-keyword">return</span> addTheSecondNumber
}
addTwoNumbers(<span class="hljs-number">4</span>)(<span class="hljs-number">5</span>) <span class="hljs-comment">// Returns 9</span>
</code></pre>
<blockquote>
<p>函数类型的语法:
<em>function-type</em><em>type</em> <strong>-&gt;</strong> <em>type</em></p>
</blockquote>
<h2 id="-">数组类型</h2>
<p>Swift语言使用类型名紧接中括号<code>[]</code>来简化标准库中定义的命名型类型<code>Array&lt;T&gt;</code>。换句话说,下面两个声明是等价的:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">let</span> someArray: <span class="hljs-built_in">String</span>[] = [<span class="hljs-string">"Alex"</span>, <span class="hljs-string">"Brian"</span>, <span class="hljs-string">"Dave"</span>]
<span class="hljs-keyword">let</span> someArray: <span class="hljs-built_in">Array</span>&lt;<span class="hljs-built_in">String</span>&gt; = [<span class="hljs-string">"Alex"</span>, <span class="hljs-string">"Brian"</span>, <span class="hljs-string">"Dave"</span>]
</code></pre>
<p>上面两种情况下,常量<code>someArray</code>都被声明为字符串数组。数组的元素也可以通过<code>[]</code>获取访问:<code>someArray[0]</code>是指第0个元素<code>“Alex”</code></p>
<p>上面的例子同时显示,你可以使用<code>[]</code>作为初始值构造数组,空的<code>[]</code>则用来来构造指定类型的空数组。</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">var</span> emptyArray: Double[] = []
</code></pre>
<p>你也可以使用链接起来的多个<code>[]</code>集合来构造多维数组。例如,下例使用三个<code>[]</code>集合来构造三维整型数组:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">var</span> array3D: Int[][][] = [[[<span class="hljs-number">1</span>, <span class="hljs-number">2</span>], [<span class="hljs-number">3</span>, <span class="hljs-number">4</span>]], [[<span class="hljs-number">5</span>, <span class="hljs-number">6</span>], [<span class="hljs-number">7</span>, <span class="hljs-number">8</span>]]]
</code></pre>
<p>访问一个多维数组的元素时,最左边的下标指向最外层数组的相应位置元素。接下来往右的下标指向第一层嵌入的相应位置元素,依次类推。这就意味着,在上面的例子中,<code>array3D[0]</code>是指<code>[[1, 2], [3, 4]]</code><code>array3D[0][1]</code>是指<code>[3, 4]</code><code>array3D[0][1][1]</code>则是指值<code>4</code></p>
<p>关于Swift标准库中<code>Array</code>类型的细节讨论见章节Arrays。</p>
<blockquote>
<p>数组类型的语法:
<em>array-type</em><em>type</em><code>[ ]</code> | <em>array-type</em><code>[ ]</code></p>
</blockquote>
<h2 id="-">可选类型</h2>
<p>Swift定义后缀<code>?</code>来作为标准库中的定义的命名型类型<code>Optional&lt;T&gt;</code>的简写。换句话说,下面两个声明是等价的:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">var</span> optionalInteger: Int?
<span class="hljs-keyword">var</span> optionalInteger: Optional&lt;Int&gt;
</code></pre>
<p>在上述两种情况下,变量<code>optionalInteger</code>都被声明为可选整型类型。注意在类型和<code>?</code>之间没有空格。</p>
<p>类型<code>Optional&lt;T&gt;</code>是一个枚举,有两种形式,<code>None</code><code>Some(T)</code>,又来代表可能出现或可能不出现的值。任意类型都可以被显式的声明(或隐式的转换)为可选类型。当声明一个可选类型时,确保使用括号给<code>?</code>提供合适的作用范围。比如说,声明一个整型的可选数组,应写作<code>(Int[])?</code>,写成<code>Int[]?</code>的话则会出错。</p>
<p>如果你在声明或定义可选变量或特性的时候没有提供初始值,它的值则会自动赋成缺省值<code>nil</code></p>
<p>可选符合<code>LogicValue</code>协议,因此可以出现在布尔值环境下。此时,如果一个可选类型<code>T?</code>实例包含有类型为<code>T</code>的值(也就是说值为<code>Optional.Some(T)</code>),那么此可选类型就为<code>true</code>,否则为<code>false</code></p>
<p>如果一个可选类型的实例包含一个值,那么你就可以使用后缀操作符<code>!</code>来获取该值,正如下面描述的:</p>
<pre><code class="lang-javascript">optionalInteger = <span class="hljs-number">42</span>
optionalInteger! <span class="hljs-comment">// 42</span>
</code></pre>
<p>使用<code>!</code>操作符获取值为<code>nil</code>的可选项会导致运行错误runtime error</p>
<p>你也可以使用可选链和可选绑定来选择性的执行可选表达式上的操作。如果值为<code>nil</code>,不会执行任何操作因此也就没有运行错误产生。</p>
<p>更多细节以及更多如何使用可选类型的例子,见章节“可选”。</p>
<blockquote>
<p>可选类型语法:
<em>optional-type</em><em>type</em>?</p>
</blockquote>
<h2 id="-">隐式解析可选类型</h2>
<p>Swift语言定义后缀<code>!</code>作为标准库中命名类型<code>ImplicitlyUnwrappedOptional&lt;T&gt;</code>的简写。换句话说,下面两个声明等价:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">var</span> implicitlyUnwrappedString: <span class="hljs-built_in">String</span>!
<span class="hljs-keyword">var</span> implicitlyUnwrappedString: ImplicitlyUnwrappedOptional&lt;<span class="hljs-built_in">String</span>&gt;
</code></pre>
<p>上述两种情况下,变量<code>implicitlyUnwrappedString</code>被声明为一个隐式解析可选类型的字符串。注意类型与<code>!</code>之间没有空格。</p>
<p>你可以在使用可选的地方同样使用隐式解析可选。比如,你可以将隐式解析可选的值赋给变量、常量和可选特性,反之亦然。</p>
<p>有了可选,你在声明隐式解析可选变量或特性的时候就不用指定初始值,因为它有缺省值<code>nil</code></p>
<p>由于隐式解析可选的值会在使用时自动解析,所以没必要使用操作符<code>!</code>来解析它。也就是说,如果你使用值为<code>nil</code>的隐式解析可选,就会导致运行错误。</p>
<p>使用可选链会选择性的执行隐式解析可选表达式上的某一个操作。如果值为<code>nil</code>,就不会执行任何操作,因此也不会产生运行错误。</p>
<p>关于隐式解析可选的更多细节,见章节“隐式解析可选”。</p>
<blockquote>
<p>隐式解析可选的语法:
implicitly-unwrapped-optional-type → type!</p>
</blockquote>
<h2 id="-">协议合成类型</h2>
<p>协议合成类型是一种符合每个协议的指定协议列表类型。协议合成类型可能会用在类型标注和泛型参数中。</p>
<p>协议合成类型的形式如下:</p>
<pre><code class="lang-javascript">protocol&lt;Protocol <span class="hljs-number">1</span>, Procotol <span class="hljs-number">2</span>&gt;
</code></pre>
<p>协议合成类型允许你指定一个值,其类型可以适配多个协议的条件,而且不需要定义一个新的命名型协议来继承其它想要适配的各个协议。比如,协议合成类型<code>protocol&lt;Protocol A, Protocol B, Protocol C&gt;</code>等效于一个从<code>Protocol A</code><code>Protocol B</code> <code>Protocol C</code>继承而来的新协议<code>Protocol D</code>,很显然这样做有效率的多,甚至不需引入一个新名字。</p>
<p>协议合成列表中的每项必须是协议名或协议合成类型的类型别名。如果列表为空,它就会指定一个空协议合成列表,这样每个类型都能适配。</p>
<blockquote>
<p>协议合成类型的语法:
<em>protocol-composition-type</em><strong>protocol</strong> &lt;<em>protocol-identifier-list[opt]</em>&gt;
<em>protocol-identifier-list</em><em>protocol-identifier</em> | <em>protocol-identifier, protocol-identifier-list</em>
<em>protocol-identifier</em><em>type-identifier</em></p>
</blockquote>
<h2 id="-">元类型</h2>
<p>元类型是指所有类型的类型,包括类、结构体、枚举和协议。</p>
<p>类、结构体或枚举类型的元类型是相应的类型名紧跟<code>.Type</code>。协议类型的元类型——并不是运行时适配该协议的具体类型——是该协议名字紧跟<code>.Protocol</code>。比如,类<code>SomeClass</code>的元类型就是<code>SomeClass.Type</code>,协议<code>SomeProtocol</code>的元类型就是<code>SomeProtocal.Protocol</code></p>
<p>你可以使用后缀<code>self</code>表达式来获取类型。比如,<code>SomeClass.self</code>返回<code>SomeClass</code>本身,而不是<code>SomeClass</code>的一个实例。同样,<code>SomeProtocol.self</code>返回<code>SomeProtocol</code>本身,而不是运行时适配<code>SomeProtocol</code>的某个类型的实例。还可以对类型的实例使用<code>dynamicType</code>表达式来获取该实例在运行阶段的类型,如下所示:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">class</span> SomeBaseClass {
<span class="hljs-keyword">class</span> func printClassName() {
println(<span class="hljs-string">"SomeBaseClass"</span>)
}
}
<span class="hljs-keyword">class</span> SomeSubClass: SomeBaseClass {
override <span class="hljs-keyword">class</span> func printClassName() {
println(<span class="hljs-string">"SomeSubClass"</span>)
}
}
<span class="hljs-keyword">let</span> someInstance: SomeBaseClass = SomeSubClass()
<span class="hljs-comment">// someInstance is of type SomeBaseClass at compile time, but</span>
<span class="hljs-comment">// someInstance is of type SomeSubClass at runtime</span>
someInstance.dynamicType.printClassName()
<span class="hljs-comment">// prints "SomeSubClass</span>
</code></pre>
<blockquote>
<p>元类型的语法:
<em>metatype-type</em><em>type</em>.<strong>Type</strong> | <em>type</em>.<strong>Protocol</strong></p>
</blockquote>
<h2 id="-">类型继承子句</h2>
<p>类型继承子句被用来指定一个命名型类型继承哪个类且适配哪些协议。类型继承子句开始于冒号<code>:</code>,紧跟由<code>,</code>隔开的类型标识符列表。</p>
<p>类可以继承单个超类,适配任意数量的协议。当定义一个类时,超类的名字必须出现在类型标识符列表首位,然后跟上该类需要适配的任意数量的协议。如果一个类不是从其它类继承而来,那么列表可以以协议开头。关于类继承更多的讨论和例子,见章节“继承”。</p>
<p>其它命名型类型可能只继承或适配一个协议列表。协议类型可能继承于其它任意数量的协议。当一个协议类型继承于其它协议时,其它协议的条件集合会被集成在一起,然后其它从当前协议继承的任意类型必须适配所有这些条件。</p>
<p>枚举定义中的类型继承子句可以是一个协议列表,或是指定原始值的枚举,一个单独的指定原始值类型的命名型类型。使用类型继承子句来指定原始值类型的枚举定义的例子,见章节“原始值”。</p>
<blockquote>
<p>类型继承子句的语法:
<em>type-inheritance-clause</em> → :<em>type-inheritance-list</em>
<em>type-inheritance-list</em><em>type-identifier</em> | <em>type-identifier</em>, <em>type-inheritance-list</em></p>
</blockquote>
<h2 id="-">类型推断</h2>
<p>Swift广泛的使用类型推断从而允许你可以忽略很多变量和表达式的类型或部分类型。比如对于<code>var x: Int = 0</code>,你可以完全忽略类型而简写成<code>var x = 0</code>——编译器会正确的推断出<code>x</code>的类型<code>Int</code>。类似的,当完整的类型可以从上下文推断出来时,你也可以忽略类型的一部分。比如,如果你写了<code>let dict: Dictionary = [&quot;A&quot;: 1]</code>,编译提也能推断出<code>dict</code>的类型是<code>Dictionary&lt;String, Int&gt;</code></p>
<p>在上面的两个例子中类型信息从表达式树expression tree的叶子节点传向根节点。也就是说<code>var x: Int = 0</code><code>x</code>的类型首先根据<code>0</code>的类型进行推断,然后将该类型信息传递到根节点(变量<code>x</code>)。</p>
<p>在Swift中类型信息也可以反方向流动——从根节点传向叶子节点。在下面的例子中常量<code>eFloat</code>上的显式类型标注(<code>:Float</code>)导致数字字面量<code>2.71828</code>的类型是<code>Float</code>而非<code>Double</code></p>
<pre><code class="lang-javascript"><span class="hljs-keyword">let</span> e = <span class="hljs-number">2.71828</span> <span class="hljs-comment">// The type of e is inferred to be Double.</span>
<span class="hljs-keyword">let</span> eFloat: Float = <span class="hljs-number">2.71828</span> <span class="hljs-comment">// The type of eFloat is Float.</span>
</code></pre>
<p>Swift中的类型推断在单独的表达式或语句水平上进行。这意味着所有用于推断类型的信息必须可以从表达式或其某个子表达式的类型检查中获取。</p>
</section>
</div>
</div>
</div>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="3.4" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="3.4" data-basepath=".." data-revision="1402321232917">
<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>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="3.6" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="3.6" data-basepath=".." data-revision="1402321232917">
<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>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="3.7" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="3.7" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_45">
<section class="normal" id="section-gitbook_47">
<h1 id="-">特性</h1>
<p>特性提供了关于声明和类型的更多信息。在Swift中有两类特性用于修饰声明的以及用于修饰类型的。例如<code>required</code>特性,当应用于一个类的指定或便利初始化器声明时,表明它的每个子类都必须实现那个初始化器。再比如<code>noreturn</code>特性,当应用于函数或方法类型时,表明该函数或方法不会返回到它的调用者。</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="3.8" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="3.8" data-basepath=".." data-revision="1402321232917">
<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>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="3.9" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="3.9" data-basepath=".." data-revision="1402321232917">
<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>

View File

@ -44,7 +44,7 @@
<div class="book" data-level="3.10" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="3.10" data-basepath=".." data-revision="1402321232917">
<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>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="3.5" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="3.5" data-basepath=".." data-revision="1402321232917">
<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>
@ -587,7 +587,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_54">
<section class="normal" id="section-gitbook_57">
<h1 id="-">语句</h1>
<p>在 Swift 中有两种类型的语句简单语句和控制流语句。简单语句是最常见的用于构造表达式和声明。控制流语句则用于控制程序执行的流程Swift 中有三种类型的控制流语句:循环语句、分支语句和控制传递语句。</p>

View File

@ -46,7 +46,7 @@
<div class="book" data-level="3" data-basepath=".." data-revision="1402311241483">
<div class="book" data-level="3" data-basepath=".." data-revision="1402321232917">
<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>

View File

@ -44,7 +44,7 @@
<div class="book" data-level="0" data-basepath="." data-revision="1402311241483">
<div class="book" data-level="0" data-basepath="." data-revision="1402321232917">
<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>
@ -585,7 +585,7 @@
<div class="page-inner">
<section class="normal" id="section-gitbook_3">
<section class="normal" id="section-gitbook_5">
<h1 id="swift-">Swift 编程语言</h1>
<p>Swift 是苹果在 WWDC 2014 上发布的一款全新的编程语言,本书译自苹果官方的 Swift 教程《The Swift Programming Language》。</p>

View File

@ -1,5 +1,5 @@
CACHE MANIFEST
# Revision 1402311241484
# Revision 1402321232918
CACHE:
index.html
@ -10,12 +10,12 @@ chapter2/13_Inheritance.html
chapter2/01_The_Basics.html
chapter2/03_Strings_and_Characters.html
chapter2/04_Collection_Types.html
chapter2/05_Control_Flow.html
chapter2/06_Functions.html
chapter2/05_Control_Flow.html
chapter2/07_Closures.html
chapter2/08_Enumerations.html
chapter2/09_Classes_and_Structures.html
chapter2/10_Properties.html
chapter2/09_Classes_and_Structures.html
chapter2/11_Methods.html
chapter2/12_Subscripts.html
chapter2/02_Basic_Operators.html

File diff suppressed because one or more lines are too long