|
|
||
|
I find an interesting issue in following code:
local i = 0;
while 0 do
i = i +1
if i > 10 then
break
end
print(i)
end
i = 0
repeat
i = i + 1
print(i)
if i > 10 then
break
end
until 0
I want to print 1 to 9 twice.
But in next repeat-until 0, it will only run once and print 1 only,
could somebody help me? Thanks
------------------------------------
C++, Lua, living in Dalian
http://sunxiunan.com/
http://twitter.com/sagasw
------------------------------------