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

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                常量 1、常量使用const修飾,代表永遠是只讀,不能修改。 2、const只能修飾boolean,number(int相關類型,浮點類型。complex)和string 3、語法: const identifier [type] =value, 其中type可以省略 示例 const b string = "hello world" 字符串 const b = "hello world" 字符串 const b = 3.1415926 浮點數 const a = 9/3 表達式 4、優雅寫法 const ( a=1 b=2 ) 5、簡易寫法,iota是將遞增,每一個const開頭,第一個項為0,在一個const中是遞增的 const ( a=iota b c ) 則a=0 b=1 c=2 const ( d=iota e f ) 則d=0 e=1 f=2 當const中添加定義的數值時,遞增被打斷,不建議這么使用 const ( a=iota b c c1=1 c2 c3 ) 則a=0 b=1 c=2 c1=1 c2=1 c3=1 當使用左移符號位時,數值也是遞增的左移 const ( a=1 << iota b c ) 則a=1 b=2 c=4 6、定于兩個常量man=1和female=2,獲取當前時間的秒數,如果能被female整除,則在終端打印female,否則打印man。 package main import ( "fmt" "time" ) const ( Man = 1 Female = 2 ) func main (){ now := time.Now() result := now.Unix() fmt.Printf("%v\n",result) if result % Female == 0 { fmt.Printf("man is :%v\n",Man) }else { fmt.Printf("female is :%v\n",Female) } } 變量 1、語法: var identifier type 示例: var a int var b int = 8 var c string = "hello" 或者 var ( a int //0 b string //"" c bool //false ) 空格是占用一個字符的空間,空串不占用
                  <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>

                              哎呀哎呀视频在线观看