[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Why does this exit the function early?
- From: Paul Butler <butler.paul@...>
- Date: Thu, 18 Jun 2009 10:08:24 -0700
Why does the "break" end the function?
I was expecting it to count to 10 and just skip over 5.
local count = 0
while true do
count = count + 1
if count == 5 then break end
if count == 10 then return end
print("why are we here?")