Jump to content

Common Lisp/Reference/defvar

From Wikibooks, open books for an open world

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

> (defvar temperature 20)

TEMPERATURE
> (print temperature)

20
20

See also

[edit | edit source]