If you attempt to evaluate a symbol that does not have a value bound to
it, you will receive an error message. You can see this by
experimenting with our 2 plus 2 addition. In the following expression,
put your cursor right after the +
, before the first number 2,
type C-x C-e:
(+ 2 2)
You will get an error message that says:
Symbol's value as variable is void: +
This is different from the first error message we saw, which said, `Symbol's function definition is void: this'. In this case, the symbol does not have a value as a variable; in the other case, the symbol (which was the word `this') did not have a function definition.
In this experiment with the +
, what we did was cause the Lisp
interpreter to evaluate the +
and look for the value of the
variable instead of the function definition. We did this by placing the
cursor right after the symbol rather than after the parenthesis of the
enclosing list as we did before. As a consequence, the Lisp interpreter
evaluated the preceding s-expression, which in this case was the
+
by itself.
Since +
does not have a value bound to it, just the function
definition, the error message reported that the symbol's value as a
variable was void.
Go to the first, previous, next, last section, table of contents.