could someone please tell me the difference between defvar, defparameter
and setf and the effects these macros have and why some are mostly used
at the top level and some are mostly used inside functions and
expresions
>>>>> On Thu, 26 Apr 2001 10:38:05 +0100, samwise gamgee ("samwise") writes:
samwise> could someone please tell me the difference between defvar, defparameter
samwise> and setf and the effects these macros have and why some are mostly used
samwise> at the top level and some are mostly used inside functions and
samwise> expresions
I would recommend consulting the Hyperspec, for example at:
<http://www.xanalys.com/software_tools/reference/HyperSpec/FrontMatter/index.html>
There you can look up the documentation for each of those forms,
which includes an explanation of the differences between them.
I suggest looking up: DEFVAR, DEFPARAMETER, DEFCONSTANT, SETQ,
and SETF, in that order.
Christopher Stacy wrote:
>
> >>>>> On Thu, 26 Apr 2001 10:38:05 +0100, samwise gamgee ("samwise") writes:
>
> samwise> could someone please tell me the difference between defvar, defparameter
> samwise> and setf and the effects these macros have and why some are mostly used
> samwise> at the top level and some are mostly used inside functions and
> samwise> expresions
>
> I would recommend consulting the Hyperspec, for example at:
> <http://www.xanalys.com/software_tools/reference/HyperSpec/FrontMatter/index.html>
> There you can look up the documentation for each of those forms,
> which includes an explanation of the differences between them.
> I suggest looking up: DEFVAR, DEFPARAMETER, DEFCONSTANT, SETQ,
> and SETF, in that order.
In addition to looking these up in the spec, since all but setq are macros, macroexpand them. You can do that in emacs, or like this:
(macroexpand '(defvar foo bar "baz"))