Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Q: how to divide program in multiple files

2 views
Skip to first unread message

glauber

unread,
Nov 27, 2000, 3:00:00 AM11/27/00
to
Hello,

sorry, this is pretty basic stuff, but the books i have seem reluctant to go
into packages and how to combine them into a larger program (maybe because
there are implementation differences lurking there?).

Anyway, the system i've been using is to create 1 package per file. Each one
of these starts with a (defpackage...) followed by (in-package). Then the
definitions for the functions in that package. I don't close the file with
(in-package "COMMON-LISP-USER").

The main program file then uses (load) to process each of the package files,
followed by (in-package "COMMON-LISP-USER").

Is this the usual way to do things? One would expect there should be some
sort of higher level mechanism to allow you to find your packages and load
them. I found "provide" and "require" in the standard, but they seem to be
very implementation-specific.


--
Glauber Ribeiro
thegl...@my-deja.com http://www.myvehiclehistoryreport.com
"Opinions stated are my own and not representative of Experian"


Sent via Deja.com http://www.deja.com/
Before you buy.

glauber

unread,
Nov 27, 2000, 3:00:00 AM11/27/00
to
In article <8vu16f$l1$1...@nnrp1.deja.com>,

[...]

> Is this the usual way to do things? One would expect there should be some
> sort of higher level mechanism to allow you to find your packages and load
> them. I found "provide" and "require" in the standard, but they seem to be
> very implementation-specific.


Following up on this, the standard says that provide and require are
"deprecated", but it doesn't give an alternative. Is there one?

glauber

0 new messages