![]() |
Programming in Lua | ![]() |
| Part I. The Language Chapter 4. Statements |
As usual, Lua first tests the while condition; if the condition is false, then the loop ends; otherwise, Lua executes the body of the loop and repeats the process.
local i = 1
while a[i] do
print(a[i])
i = i + 1
end
| Copyright © 2003-2004 Roberto Ierusalimschy. All rights reserved. |
|
![]() |