[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error: Unbound variable or undefined function ?

Here is a session I got:
Welcome to Macintosh Common Lisp Version 2.0b1!
? (foo x)
> Error: Unbound variable: X
> While executing: SYMBOL-VALUE

Is it normal?
I mean: Does CLtL recommand to evaluate the arguments of a function *BEFORE*
testing if the function is defined ?

This is particularly ennoying when *in my mind* foo is a macro or special-form:
? (defub bar ())
> Error: Unbound variable: BAR
> While executing: SYMBOL-VALUE

So, is it normal, is it implementation-dependent, is it a bug of the compiler?
Actually, this is more a problem for toplevel forms, since, if it is embedded
in a function definition, the compiler warns:
;Warning: Undeclared free variable X in ...

Of course, when you've already seen the problem, you can recognize it, but
sometimes, it's a little bit more subtle (when you forget importation):
? (defmethod dur ())
> Error: Unbound variable: DUR
> While executing: SYMBOL-VALUE

Thanks in advance						[jack]