In article <················@cslab9d.cs.brown.edu> ··@cs.brown.edu
(rodrigo vanegas) writes:
> What is the LISP equivalent of C's
> #include <foo.lisp> ?
> Notice i'm not asking about
> #include "foo.lisp"
The closest equivalent is (require :foo). It doesn't look for
foo.lisp in /usr/include etc. (although an implementation would be
allowed to do it that way), but uses an implementation-dependent
mechanism to search for a module named FOO. The module must contain a
PROVIDE form for the name FOO somewhere. Once it is loaded, its name
("FOO") is noted in the *MODULES* global variable, and this will
prevent subsequent REQUIREs to load it again.
--
Simon.
In article <················@cslab9d.cs.brown.edu> ··@cs.brown.edu (rodrigo vanegas) writes:
What is the LISP equivalent of C's
#include <foo.lisp> ?
Notice i'm not asking about
#include "foo.lisp"
rodrigo vanegas
··@cs.brown.edu
I think the simplest, corresponding solution in Lisp way is simply
(load "foo.lisp")
Wolfgang
--
-------------------------------------------------------------------------
... always look on the bright side of life ... (Monty Python)
-------------------------------------------------------------------------
Wolfgang Koehler ····@first.gmd.de
GMD-FIRST an der TU Berlin German National Research Centre
Tel. (Berlin 030/049) 6704-2650 for Computer Science
In article <··················@doppel.first.gmd.de>, ····@doppel.first.gmd.de (Wolfgang Koehler) writes:
> What is the LISP equivalent of C's: #include <foo.lisp>
> Notice i'm not asking about: #include "foo.lisp"
>I think the simplest, corresponding solution in Lisp way is simply
>(load "foo.lisp")
>Wolfgang
load only looks in the current directory, unless the string passed is
an absolute pathname. "#include <foo.lisp>", however, looks through a
pre-set path of possible directories usually passed to the compiler on
the command line and including the standard "/usr/include".
rodrigo vanegas
··@cs.brown.edu