lua中的循環語句

lua當中的循環語句 while循環 –[[ 語法格式–]] while(條件) do print(「循環體」) end(結束語句) local a=10 while(a<2) do print(「a的值」,a) a=a-1 --[[ lua當中是不支持a-=1這樣的寫法的 --]] end for循環 i=1 爲初始值 10爲限定的條件 1爲每次循環加一 for i=1,10,1 do prin
相關文章
相關標籤/搜索