<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智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # Lua基礎數據類型 #### nil nil是一種類型,Lua將nil用于表示“無效值”。一個變量在第一次賦值前的默認值是nil,將nil賦予給一個全局變量就等同于刪除它。 ~~~ local num print(num) -->output:nil num = 100 print(num) -->output:100 ~~~ #### boolean 布爾類型,可選值true/false;Lua中nil和false為“假”,其它所有值均為“真”。 ~~~ local a = true local b = 0 local c = nil if a then print("a") else print("not a") end if b then print("b") else print("not b") end if c then print("c") else print("not c") end ------output: a b not c ~~~ #### number 數字,包括整數與浮點數 ~~~ local order = 3 local score = 98.5 ~~~ #### string 字符串 ~~~ local website = "www.google.com" ~~~ #### table 表,關聯數組,索引可為字符串string或(整)數number類型 ~~~ local corp = { web = "www.example.com", telephone = "12345678", staff = {"Jack", "Scott", "Gary"}, 100876, 100191, ["City"] = "Beijing" } print(corp.web) -->output:www.google.com local key = "telephone" print(corp[key]) -->output:12345678 print(corp[2]) -->output:100191 print(corp["City"]) -->output:"Beijing" print(corp.staff[1]) -->output:Jack ~~~ #### function 在Lua中,**函數**也是一種數據類型,函數可以存儲在變量中,可以通過參數傳遞給其他函數,還可以作為其他函數的返回值。 > 示例 ~~~ function foo() print("in the function") --dosomething() local x = 10 local y = 20 return x + y end ~~~
                  <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>

                              哎呀哎呀视频在线观看