when you load a file you set a flag e.g. xxx_loaded:true. or perhaps a version number
and then if not (equal(xxx_loaded,true) then load ("xxx").
There are lots of variations. Common Lisp used to have require and provide.
RJF
----- Original Message -----
From: Oliver Kullmann <O.Kullmann at swansea.ac.uk>
Date: Friday, December 21, 2007 6:52 am
Subject: "load" with guards etc. ??
To: maxima at math.utexas.edu
> Hello,
>
> for our own library of Maxima-functions, which are distributed over
> several .mac-files, we use "load" to include the files on which the
> given file depends, right?
>
> So "load" is the equivalent of "#include" in the C/C++ world.
> However, apparently there is no functionality concerned with
> preventing multiple inclusions (especially circular inclusions)?
>
> I wonder how other users deal with that problem --- everybody writes
> his little utilities to handle this, I guess? Or are some underlying
> clisp-mechanisms used?
>
> Thanks for your help in any case.
>
> Oliver
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima