Re: How to process contents of a list variable through a macro ?
- From: "John Thingstad" <john.thingstad@xxxxxxxxx>
- Date: Tue, 20 Feb 2007 16:28:06 +0100
On Tue, 20 Feb 2007 13:03:41 +0100, joswig@xxxxxxxxxxxxxxxxxxxxxxx <joswig@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
On Feb 20, 12:34 pm, "John Thingstad" <john.things...@xxxxxxxxx>
wrote:
On Tue, 20 Feb 2007 09:16:48 +0100, jos...@xxxxxxxxxxxxxxxxxxxxxxx
<jos...@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> A DEFPARAMETER doesn't get executed at compile time.
> But the compiler executes the Macros during compile time.
> Even those that are defined in the file you compile.
> If a macro then references a variable that is in
> the same file...
A DEFPARAMETER does (!) get executed at compile time.
It is a DEFVAR declaration that dosn't.
That's wrong.
CLHS:
If a defvar or defparameter form appears as a top level form, the
compiler must recognize that the name has been proclaimed special.
However, it must neither evaluate the initial-value form nor assign
the dynamic variable named name at compile time.
--
Using Opera's revolutionary e-mail client:http://www.opera.com/mail/
Hyperspec:
"defparameter unconditionally assigns the initial-value to the dynamic variable named name.
defvar, by contrast, assigns initial-value (if supplied) to the dynamic variable named name only
if name is not already bound."
So defvar values get assigned a value when they are first loaded and then remain the same.
defparameter values by contrast get assigned te initial value each time they are evalueated
/compiled.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
.
- Follow-Ups:
- Re: How to process contents of a list variable through a macro ?
- From: John Thingstad
- Re: How to process contents of a list variable through a macro ?
- References:
- How to process contents of a list variable through a macro ?
- From: jurgen_defurne
- Re: How to process contents of a list variable through a macro ?
- From: jurgen_defurne
- Re: How to process contents of a list variable through a macro ?
- From: joswig@xxxxxxxxxxxxxxxxxxxxxxx
- Re: How to process contents of a list variable through a macro ?
- From: John Thingstad
- Re: How to process contents of a list variable through a macro ?
- From: joswig@xxxxxxxxxxxxxxxxxxxxxxx
- How to process contents of a list variable through a macro ?
- Prev by Date: Re: common lisp as scripting language
- Next by Date: Re: How to process contents of a list variable through a macro ?
- Previous by thread: Re: How to process contents of a list variable through a macro ?
- Next by thread: Re: How to process contents of a list variable through a macro ?
- Index(es):
Relevant Pages
|