Re: Global predicates in SWI and Sicstus Prolog
From: Bart Demoen (bmd_at_cs.kuleuven.ac.be)
Date: 08/23/04
- Next message: Stephan Lehmke: "Re: Godel's Incompleteness and Nonmonotonic Logic"
- Previous message: Christoph Quix: "Global predicates in SWI and Sicstus Prolog"
- In reply to: Christoph Quix: "Global predicates in SWI and Sicstus Prolog"
- Next in thread: Christoph Quix: "Re: Global predicates in SWI and Sicstus Prolog"
- Reply: Christoph Quix: "Re: Global predicates in SWI and Sicstus Prolog"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 23 Aug 2004 11:40:47 +0200
> 2. Sicstus Prolog
[...]
> So, how can I make bar/1 visible within the "test" module?
> use_module(user) can't be the solution (it prompts for user input).
> The order in which I consult the files does not make a difference.
There might be more than one way to do it, and maybe better than what I
suggest, but putting in file1.pl the directive
:- use_module('file2.pl',[bar/1]).
seems to do what you want.
Cheers
Bart Demoen
ps. look in the SICStus manual - it took me about 1 minute to come up
with the above - I didn't know this beforehand
- Next message: Stephan Lehmke: "Re: Godel's Incompleteness and Nonmonotonic Logic"
- Previous message: Christoph Quix: "Global predicates in SWI and Sicstus Prolog"
- In reply to: Christoph Quix: "Global predicates in SWI and Sicstus Prolog"
- Next in thread: Christoph Quix: "Re: Global predicates in SWI and Sicstus Prolog"
- Reply: Christoph Quix: "Re: Global predicates in SWI and Sicstus Prolog"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]