![]() |
Programming in Lua | ![]() |
| Part I. The Language Chapter 4. Statements |
As the name implies, a repeat-until statement repeats its body until its condition is true. The test is done after the body, so the body is always executed at least once.
-- print the first non-empty line
repeat
line = os.read()
until line ~= ""
print(line)
| Copyright © 2003-2004 Roberto Ierusalimschy. All rights reserved. |
|
![]() |