Next: , Previous: , Up: Variables   [Contents][Index]


5.8.4 Void Variables

A variable which has no value is said to be void, attempting to reference the value of such a symbol will result in an error. It is possible for the most recent binding of a variable to be void even though the inactive bindings may have values.

Function: boundp symbol

Returns true if symbol is bound to a variable.

Function: makunbound symbol

This function makes the current binding of symbol as a variable be void, then returns symbol.

(setq foo 42)
    ⇒ 42
foo
    ⇒ 42
(boundp 'foo)
    ⇒ t
(makunbound 'foo)
    ⇒ foo
(boundp 'foo)
    ⇒ ()
foo
    error→ Value as variable is void: foo