[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: #ifdef for liszt?
- To: Wilson.Harvey@cmu-cs-ius
- Subject: Re: #ifdef for liszt?
- From: Liz Allen <liz@tove>
- Date: Wed, 24 Apr 85 20:00:16 GMT
- Cc: franz-friends@Berkeley
- In-reply-to: Your message of 22 Apr 85 12:05:53 EST. <8504240146.AA10636@UCB-VAX.ARPA>
- Original-date: 24 Apr 85 15:00:16 EST (Wed)
Is there anything for the lisp compiler akin to the "#ifdef" statement
for the C compiler? Can anyone point me to something similar?
Thanks. -- Wilson
The reader has built into it a switch that works in both liszt and
lisp. You can tell lisp whether or not to read an expression by
putting before that expression something like:
#+(or feature ...)
#+(and feature ...)
where feature is on iff it is on the "(status features)" list (which
can be modified). Thus you can do something like this:
#-uomlisp (defun morerecent (file1 file2) ...)
since uomlisp is turned only in Franz's that contain all our hacks and
morerecent happens to already be defined in our stuff. If you look at
the liszt code, you'll see lots of "#+vax"'s and "#+68k"'s where the
code needs to be different, eg:
(defun cc-foo (x y z)
(bar #+vax vax-arg
It can be quite convenient especially when you have two lisps that are
almost the same, you can maintain just one source containing these
things whenever the sources for the different lisps must be different.
I know this stuff is documented in the code in charmac.l; I can't
remember right now if it is documented in the Franz reference manual
and I don't have it with me right now to check.
Hope this helps.