lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>3.3.7 Local Declarations
>...
>A chunk is also a block (see §3.3.1),and so local ariables can be declared
>outside any explicit
>block.Such local ariables die when the chunk ends.
>...
>
>Is here "outside" correct ?

Yes. This means that you can write things like

  local x=2

at the "top level" of your Lua programs.

Explicit blocks are those delimited by do..end, then..else, then..end, etc.
--lhf