identifiers
Identifiers in Lua can be any string of letters, digits, and underscores, not beginning with a digit, of any length. For example:
Lua is case-sensitive, so foo and FOO are different identifiers.
Identifiers cannot be reserved words, these words are reserved:
a b monster abc876 _foo a_variable_with_a_long_name
You should avoid using identifiers starting with an underscore followed by upper-case letters, as these are reserved for Lua variables such as _VERSION.Lua is case-sensitive, so foo and FOO are different identifiers.
Identifiers cannot be reserved words, these words are reserved:
-
and
break
do
else
elseif
end
false
for
function
if
in
local
nil
not
or
repeat
return
then
true
until
while
Lua keyword/topics
- assignment
- break
- comments
- data types
- do
- for (generic)
- for (numeric)
- function
- if / then / else
- keywords
- local
- logical operators
- precedence
- relational operators
- repeat
- return
- string literals
- tables
- while
Topics
- Lua LPEG library
- Lua PCRE regular expression functions
- Lua SQLite (database) interface
- Lua base functions
- Lua bc (big number) functions
- Lua bit manipulation functions
- Lua coroutine functions
- Lua debug functions
- Lua io functions
- Lua math functions
- Lua os functions
- Lua package functions
- Lua script extensions
- Lua string functions
- Lua syntax
- Lua table functions
- Lua utilities
- Scripting callbacks - plugins
- Scripting