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

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # 選擇判斷 ## IF : ~~~ var a int = 3 if a == 3 { fmt.Println("a==3") } //支持一個初始化表達式 初始化字句和條件表達式直接需要用分號分隔 if b := 3; b == 3 { fmt.Println("b==3") } ~~~ ~~~ if a := 3; a == 4 { fmt.Println("a==4") } else { //左大括號必須和條件語句或else在同一行 fmt.Println("a!=4") } ~~~ ## switch:里面switch默認相當于每個case最后帶有break,匹配成功后不會自動向下執行其他case,而是跳出整個switch, 但是可以使用fallthrough強制執行后面的case代碼 ~~~ var score int = 90 switch score { case 90: fmt.Println("優秀") //fallthrough case 80: fmt.Println("良好") //fallthrough case 50, 60, 70: fmt.Println("一般") //fallthrough default: fmt.Println("差") } ~~~ # 循環 ## for ~~~ var i, sum int for i = 1; i <= 100; i++ { sum += i } fmt.Println("sum = ", sum) ~~~ ## range 循環slice map 數組使用 ~~~ s := "abc" //利index取值 for i := range s { //支持 string/array/slice/map。 fmt.Printf("%c\n", s[i]) } //忽略index取值 for _, c := range s { // fmt.Printf("%c\n", c) } ~~~
                  <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>

                              哎呀哎呀视频在线观看