true Value

nil (value)


In the Lua language, the value nil is special and is to mean false, or the equivalent of a NULL pointer in the C language. The value nil is designed to be different from any other possible value.

Usage

    Setting a table or variable equal to nil to cause Lua to delete it from use and collect its memory usage.

    Returned values can be tested for equality to nil.

    Lua returns nil for variables, functions, etc. that do not exist.

Related Topics

true, false