![]() |
Programming in Lua | ![]() |
Part I. The Language Chapter 2. Types and Values |
Nil is a type with a single value, nil, whose main property is to be different from any other value. As we have seen, a global variable has a nil value by default, before a first assignment, and you can assign nil to a global variable to delete it. Lua uses nil as a kind of non-value, to represent the absence of a useful value.
Copyright © 2003-2004 Roberto Ierusalimschy. All rights reserved. |
![]() |
![]() |