本文主要记录一下Lua语言中的代码块和控制结构。

在交互模式中,每一行代码就是一个代码段。

do...end用来显式定义代码块。控制结构(if then else endwhile endrepeat untilfor end)也是一个代码块。