Next: , Previous: , Up: The language   [Contents][Index]


5.8 Variables

In Lisp, symbols are used to represent variables. Each symbol contains a value slot that is used to contain the value of the symbol when it used as a variable.

The normal way to obtain the current value of a variable is simply to evaluate the symbol of the same name (i.e. write the name of the variable in your program). The symbol-value function can be used to evaluate variables whose names not known statically.

Function: symbol-value variable

This function returns the value of the symbol variable in the current environment.