modules

From: Stefano Novello <Stefano.Novello_at_parc-technologies.com>
Date: Tue 19 Sep 2000 04:36:09 PM GMT
Message-ID: <NEBBLAHKJKLJCMAJPDHEOEMHCBAA.Stefano.Novello@parc-technologies.com>
Hi,
I have 2 files m1.p and m2.pl

:- module(m1).

:- export p/0.
p :- writeln(m1).

and


:- module(m2).

:- export p/0.
p :- writeln(m2).

The from eclipse I do the following:

ECLiPSe Constraint Logic Programming System [kernel]
Copyright Imperial College London and ICL
Certain libraries copyright Parc Technologies Ltd
GMP library copyright Free Software Foundation
Version 5.0.0, Wed Jul 19 01:09 2000
[eclipse 1]: use_module(m1).
m1.pl      compiled traceable 60 bytes in 0.01 seconds

yes.
[eclipse 2]: p.
m1

yes.
[eclipse 3]: erase_module(m1).

yes.
[eclipse 4]: use_module(m2).
m2.pl      compiled traceable 60 bytes in 0.00 seconds

yes.
[eclipse 5]: p.
calling an undefined procedure p in module eclipse
[eclipse 6]: current_predicate(X).

X = system / 1     More? (;) 

no (more) solution.
[eclipse 7]: ^D
bye

what I expected was that I could use the definition of p
in m2.

A related behavior is
ECLiPSe Constraint Logic Programming System [kernel]
Copyright Imperial College London and ICL
Certain libraries copyright Parc Technologies Ltd
GMP library copyright Free Software Foundation
Version 5.0.0, Wed Jul 19 01:09 2000
[eclipse 1]: use_module(m1).
m1.pl      compiled traceable 60 bytes in 0.00 seconds

yes.
[eclipse 2]: erase_module(m1).

yes.
[eclipse 3]: use_module(m1).
not a module in use_module(m1)
[eclipse 4]: 

Is this also a bug?

We are trying to use erase_module so that we have a module where we keep
data. When we erase it we want to reset it completely.

Stefano
 
2nd Floor The Tower Building	EMAIL: Stefano.Novello@parc-technologies.com
11 York Road                      TEL: +44 20 72614017
SE1 7NX LONDON                    FAX: +44 20 72614001
 



Received on Tue Sep 19 17:37:35 2000

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:00 PM GMT GMT