<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                現在我們寫了一些函數,是時候學習一下注釋了。注釋是你幫助其他程序猿理解你的代碼的備注。編譯器基本上會忽略它們。 Rust有兩種需要你了解的注釋格式:_行注釋_(_line comments_)和_文檔注釋_(_doc comments_)。 ~~~ // Line comments are anything after '//' and extend to the end of the line. let x = 5; // this is also a line comment. // If you have a long explanation for something, you can put line comments next // to each other. Put a space between the // and your comment so that it's // more readable. ~~~ 另一種注釋是文檔注釋。文檔注釋使用`///`而不是`//`,并且內建Markdown標記支持: ~~~ /// `hello` is a function that prints a greeting that is personalized based on /// the name given. /// /// # Arguments /// /// * `name` - The name of the person you'd like to greet. /// /// # Example /// /// ```rust /// let name = "Steve"; /// hello(name); // prints "Hello, Steve!" /// ~~~ fn hello(name: &str) { println!("Hello, {}!", name); } ``` 當書寫文檔注釋時,加上參數和返回值部分并提供一些用例將是非常有幫助的。不要擔心那個`&str`,我們馬上會提到它。 你可以使用[rustdoc](http://kaisery.gitbooks.io/rust-book-chinese/content/content/4.4.Documentation%20%E6%96%87%E6%A1%A3.md)工具來將文檔注釋生成為HTML文檔。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看