update 02/21 and 03/10

This commit is contained in:
numbbbbb
2014-06-10 12:14:55 +08:00
parent 7d716b5daf
commit 9eddc9af5a
41 changed files with 637 additions and 184 deletions

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.2" data-basepath=".." data-revision="1402328527093">
<div class="book" data-level="2.2" data-basepath=".." data-revision="1402373659943">
<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_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>
@ -713,7 +713,7 @@ let c = a++ // a 现在 2, 但 c 是 a 自增前的值 1
<p>数值的正负号可以使用前缀 <code>-</code> (即单目负号) 来切换:</p>
<pre><code class="lang-swift">let three = 3
let minusThree = -three // minusThree 等于 -3
let plusThree = -minusThree // plusThree 等于 3, o&quot;负负3&quot;
let plusThree = -minusThree // plusThree 等于 3, 或 &quot;负负3&quot;
</code></pre>
<p>单目负号写在操作数之前, 中间没有空格.</p>
<h1 id="-">单目正号</h1>