Common Lisp/Reference/defvar

From Wikibooks, open books for an open world
Jump to: navigation, search

The defvar special form defines variables with a global scope. The following example declares a global variable with the symbol "temperature" and sets it's value to 20:

> (defvar temperature 20)
 
TEMPERATURE
> (print temperature)
 
20
20


See also[edit]