平时用的比较少,一直记不起来的,对应c#中的 do while
local i = 1 local len = 10 repeat --do something i = i + 1 until i <= len
for是最常用的
local len = 10 for i=1,len do --do something end local step = 2 for i=1,len,step do --do something end
while
local i = 1 local len = 10 while i <= len do --do something i = i + 1 end
标签:do,--,len,备忘,语法,while,循环,something,local From: https://www.cnblogs.com/sailJs/p/17407749.html