Re: Global predicates in SWI and Sicstus Prolog
From: Christoph Quix (cqx_at_gmx.de)
Date: 08/23/04
- Next message: Bart Demoen: "Re: Global predicates in SWI and Sicstus Prolog"
- Previous message: Stephan Lehmke: "Re: Godel's Incompleteness and Nonmonotonic Logic"
- In reply to: Bart Demoen: "Re: Global predicates in SWI and Sicstus Prolog"
- Next in thread: Bart Demoen: "Re: Global predicates in SWI and Sicstus Prolog"
- Reply: Bart Demoen: "Re: Global predicates in SWI and Sicstus Prolog"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 23 Aug 2004 12:35:36 +0200
Bart Demoen wrote:
> :- use_module('file2.pl',[bar/1]).
Ok, that avoids the error message, but it does not make
the predicate global, it just defines another predicate
bar/1 in module test. Look at the following output:
| ?- foo(X).
X = z ? ;
no
| ?- assert(bar(x)).
yes
| ?- foo(X).
X = z ? ;
no
| ?- assert(test:bar(x)).
yes
| ?- foo(X).
X = z ? ;
X = x ? ;
no
So, if I would use the same directive in a second module,
the predicates would be different.
Regards,
Christoph
P.S.:
> ps. look in the SICStus manual - it took me about 1 minute to come up
> with the above - I didn't know this beforehand
I did, and I checked a few possible solutions by examples.
But nothing really worked so far.
- Next message: Bart Demoen: "Re: Global predicates in SWI and Sicstus Prolog"
- Previous message: Stephan Lehmke: "Re: Godel's Incompleteness and Nonmonotonic Logic"
- In reply to: Bart Demoen: "Re: Global predicates in SWI and Sicstus Prolog"
- Next in thread: Bart Demoen: "Re: Global predicates in SWI and Sicstus Prolog"
- Reply: Bart Demoen: "Re: Global predicates in SWI and Sicstus Prolog"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|