This first edition was written for Lua 5.0. While still largely relevant for later versions, there are some differences.
The fourth edition targets Lua 5.3 and is available at Amazon and other bookstores.
By buying the book, you also help to support the Lua project.
|Programming in Lua
|Part I. The Language Chapter 4. Statements
Lua provides a small and conventional set of control structures, with if for conditional and while, repeat, and for for iteration. All control structures have an explicit terminator: end terminates the if, for and while structures; and until terminates the repeat structure.
The condition expression of a control structure may result in any value. Lua treats as true all values different from false and nil.
|Copyright © 2003–2004 Roberto Ierusalimschy. All rights reserved.