Re: include/1 directive

From: Kish Shen <ks15_at_icparc.ic.ac.uk>
Date: Mon 09 Dec 2002 01:29:51 PM GMT
Message-Id: <E18LNyp-0006AM-00@holborn.icparc.ic.ac.uk>
Hi Sabastian,

>Is there a way of having the *real* include/1 to include a file into
>another one?

Not at the moment (at least not within ECLiPSe itself).

>Having a real include is very different
>from compile/1 and, among other things, one cannot divide the definition
>of a predicate among different files, etc...

You can't in general divide the definition of your predicate within the
same file, so a real include/1 will not really allow you to divide the
definition of a predicate into different files (except you can start
one predicate defintion just before the inlcude, and continue it in the
included file, but this is definitely *not* a good idea). The main
difference between a real include/1 and compile/1 is in the treatment
of modules as described in the documentation.

If you really want to spread the definition of a predicate in several files
(but within the same module), you can declare it to be dynamic. However,
in general, it is probably a bad idea to spread the definition of a 
predicate into several files (you are much more likely to make mistakes,
forget to update one part while you update the other, etc.).

Cheers,

Kish Shen
Received on Mon Dec 09 12:30:15 2002

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:19 PM GMT GMT