Subject: question regarding macros

From: [email-masked] (Dan Stanger)
Date: Tue, 17 Jan 1995 11:56:02 -0700

i have defined a macro as follows.
(defmacro schema (n d p)
  (let ((cd (compile-definition-part d)) (cp (compile-predicate-part p)))
  `(defclass ,n () ,cd)
(break)

...
when the break occurs  n has the value x.  if i then try to execute
(make-instance 'x) i get the error message x does not name a class.
could somebody explain this problem to me.
thanks,
dan stanger

---

From: [email-masked]
Date: Wed, 18 Jan 95 9:15 GMT

You did not put ` before (break). So, (break) is executed when
the macro extension works (during pre-processing). On the other hand,
`(defclass ,n () ,cd) is not executed at this stage: it is executed later --
during the actual program execution.

Yours sincerely,
Dr M.Semenov