This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
snuggles08's profile picture

Loop until?

Started by snuggles08, 03 December 2013 - 07:08 PM
snuggles08 #1
Posted 03 December 2013 - 08:08 PM
I need a program to loop until a criteria is met.
Example:
until var = 5
var = random
end
print("Yes")
–I know this does not work.
Lyqyd #2
Posted 04 December 2013 - 12:23 AM
So, um, a repeat loop?


local x = 1
repeat
  x = x + 1
until x == 5