From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!uio.no!Norway.EU.net!not-for-mail From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: Macros Date: 12 Aug 2002 18:23:14 +0000 Organization: Naggum Software, Oslo, Norway Lines: 22 Message-ID: <3238165394875049@naggum.no> References: <3d56c366$1@nntphost.cis.strath.ac.uk> <3238097891764805@naggum.no> <3d577de3@nntphost.cis.strath.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: oslo-nntp.eunet.no 1029176592 21435 193.71.199.50 (12 Aug 2002 18:23:12 GMT) X-Complaints-To: abuse@KPNQwest.no NNTP-Posting-Date: 12 Aug 2002 18:23:12 GMT Mail-Copies-To: never User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.lisp:37813 * "Thomas Stegen CES2000" | But in the end it showed me that macros and functions aren't that | different. I thought that (defmacro madd () (+ 5 10)) would return '(+ 5 | 10). That it does not, seems like a good thing to me. Not to belabor the obvious, but it occurred to me that you need write (defmacro madd () `(+ 5 10)) to make it return the list (+ 5 10). Note the backquote/grave, but you could have used a simple ' in this case. If you want it to return '(+ 5 10), you actually have write (defmacro madd () ''(+ 5 10)) -- Erik Naggum, Oslo, Norway Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.