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

macros...



... the never-ending issue...

I have a - probably trivial - question, transmitted by one of my students (who
thought that
I knew something *really* this time...)

We use '103.

The doc says that "when" is a macro defined  more or less like that:

(define-macro when
   (lambda (test . body)
      `(if ,test (begin ,@body))))


OK, "when" is defined and known as a macro. But if you define yourself this
macro
(with a different name, say "whon"), then

Scheme under Linux reports upon (global-defined-value 'whon)  :  #<macro>. OK.
Under Windows 2000 we got : #<struct:z:syntax>,
and expand-defmacro doesn't treat '(whon something etcaetera) seriously.

Did we do something silly, or what?
Can I *really* define macros, and what is this struct:z:syntax stuff?

(We are working on some rewriting exercises, and we need to control the
expansion, and in general to know what's going on.)

Will it behave similarly in '2.0?

Best regards.

Jerzy Karczmarczuk