undefined_p, undefined_symbol_p
undefined_p,
undefined_symbol_p — test for undefined types and symbols.
undefined_p (s_exp)
undefined_symbol_p (s_exp)
s_expAny Gamma or Lisp expression.
These two functions perform a similar task, checking to see if the
s_exp is defined. However, they differ in two
important ways:
undefined_p examines the value of
s_exp directly, whereas
undefined_symbol_p expects the value of
s_exp to be a symbol, and examines the
value of that resulting symbol.
undefined_p evaluates its argument in a
protected scope where any "Symbol is
undefined" errors will be trapped and
disregarded. undefined_symbol_p evaluates its
argument without protection, so it is possible that a
"Symbol is undefined" error
could be thrown if the evaluation of s_exp
generates such an error.
Gamma>a = #xyzxyzGamma>undefined_p (a);nilGamma>undefined_symbol_p (a);tGamma>xyz = t;tGamma>undefined_symbol_p (a);nilGamma>undefined_p (y);tGamma>undefined_symbol_p (y);Symbol is undefined: y debug 1>