correct the duplicated code

This commit is contained in:
numbbbbb
2014-06-09 15:55:49 +08:00
parent 7c38a5ab70
commit a5ff8d0962
42 changed files with 90 additions and 90 deletions

View File

@ -46,7 +46,7 @@
<div class="book" data-level="2.6" data-basepath=".." data-revision="1402300340983">
<div class="book" data-level="2.6" data-basepath=".." data-revision="1402300498179">
<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_79">
<section class="normal" id="section-gitbook_137">
<h1 id="-functions-">函数Functions</h1>
<p>本页包含内容:</p>
@ -760,8 +760,8 @@
<pre><code> join(string: &quot;hello&quot;, toString: &quot;world&quot;, withJoiner: &quot;-&quot;)
// returns &quot;hello-world
</code></pre><p>当这个函数被调用时,如果<code>joiner</code>的值没有被指定,函数会使用默认值(&quot; &quot;</p>
<pre><code> join(string: &quot;hello&quot;, toString: &quot;world&quot;, withJoiner: &quot;-&quot;)
// returns &quot;hello-world
<pre><code> join(string: &quot;hello&quot;, toString:&quot;world&quot;)
// returns &quot;hello world&quot;
</code></pre><h3 id="-external-names-for-parameters-with-default-values-">默认值参数的外部参数名External Names for Parameters with Default Values</h3>
<p>在大多数情况下,给带默认值的参数起一个外部参数名是很有用的。这样可以保证当函数被调用且带默认值的参数被提供值时,实参的意图是明显的。</p>
<p>为了使定义外部参数名更加简单当你未给带默认值的参数提供外部参数名时Swift会自动提供外部名字。此时外部参数名与局部名字是一样的就像你已经在局部参数名前写了<code>井号(#</code>一样。</p>