“sementara Loop Lua” Kode Jawaban

Forever Loop di Lua

while( true )
do
   print("This loop will run forever.")
end
Catking The Cat That Has An Extremely Long Username

Lanjutkan di Lua

-- Lua has no continue statement because it's designed to
-- be lightweight. Use goto instead:

arr = {1, 2, 3, 5, 6, 7, 8}

for key, val in ipairs(arr) do
  if val > 6 then
     goto skip_to_next
  end
  -- perform some calculation
  
  ::skip_to_next::
end
Graceful Gull

sementara Loop Lua

while i < n do
	print(i^2) -- Same here
	i = i+1 --Stick your own here
end
Vitalik-Hakim

Saat loop di Lua

local can_do = true
local countdown = 0.85 --you can choose whatever you want

while can_do do
    --here your code
    wait(countdown)    
dl.guy

buka saat loop lua

Open while loops can potentially crash your program so be careful!
Chris P. Bacon

Jawaban yang mirip dengan “sementara Loop Lua”

Pertanyaan yang mirip dengan “sementara Loop Lua”

Lebih banyak jawaban terkait untuk “sementara Loop Lua” di Lua

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya