lua-users home
lua-l archive

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


The loop and the function parameters serve as declarations for the variables. Note that a local declaration outside the scope of those constructs is a declaration of a different variables. Global-by-default only applies to undeclared variables. The "local" statement only exists to provide declarations for variables that can't be readily defined via other constructs like loops and functions.

Mark