<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                當某個表達式為true的時候 while 循環被執行。就像if 語句,它的表達式必須返回一個布爾類型值,當然,可以通過Std.bool() 強制轉換。 while循環有兩種代表性的方式:在執行進一步的循環代碼之前執行評估,和執行循環之后再進行條件評估。后者通常是 do while 循環,do 關鍵字是必須的: ~~~ // while loop while ( someVar == someValue ) { // do code } // do while loop do { // do code } while ( someVar == someValue ); ~~~ 就像 if 語句,如果只有一個單行代碼,語句塊的花括號并不是必須的。 while 和 do ... while 值ijande區別是,在while循環里,只有評估表達式返回true 的時候才會執行循環。而do...while循環中,無論表達式評估為ture或false,循環至少會執行一次,但是只有表達式為true的時候才會重復執行。 ~~~ class WhileLoops { public static function main() { var myInt : Int = 0; // will print to screen ten times while ( myInt < 10 ) trace( “displayed “ + ( ++myInt ) + “ times” ); // will skip as myInt == 10 while ( myInt < 10 ) trace( “displayed “ + ( ++myInt ) + “ times” ); // will display once as myInt will be bigger than 0 // though this is not evaluated until after one iteration do trace( “displayed “ + ( 10 - --myInt ) + “ times” ) while ( myInt < 0 ); } } ~~~ 如例子中看到的,do...while循環中執行的一行代碼不用以分號結束。就像 if 語句一樣,一個 do...while循環不需要對單行的語句添加分號。事實上,編譯器會自動為其添加。但是,對于語句塊,仍然需要應用分號。
                  <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>

                              哎呀哎呀视频在线观看