Discussion:
discontiguous predicate
carlos calderon
2001-05-04 10:42:31 UTC
Permalink
hi all,

I've got a simple list of facts, i.e:

female(joan).
male(david).
male(paul).
female(rachel).

Well, if i try to compile this, it gives me a warning: discontiguous predicate female/1.
Ok, I can change the order of my predicate to make them "contiguous" but that's not a proper solution.
I went to the gnu_prolog manual, pag-42 section 5.1.5 and based upon that I thought this might work:
discontiguous(female).
female(joan).
male(david).
male(paul).
female(rachel).

but it didn't. I got the same warning.

Again, apologies if the question has been answered before but I am new to the list and on the steep end of prolog's learning curve.

-Carlos
Luis Quintano
2001-05-04 11:05:10 UTC
Permalink
You should do

discontiguous(female/1)

See you,

~/Luis Quintano
Post by carlos calderon
hi all,
female(joan).
male(david).
male(paul).
female(rachel).
Well, if i try to compile this, it gives me a warning: discontiguous predicate female/1.
Ok, I can change the order of my predicate to make them "contiguous" but that's not a proper solution.
discontiguous(female).
female(joan).
male(david).
male(paul).
female(rachel).
but it didn't. I got the same warning.
Again, apologies if the question has been answered before but I am new to the list and on the steep end of prolog's learning curve.
-Carlos
ED-DBALI AbdelAli
2001-05-04 11:42:14 UTC
Permalink
Post by Luis Quintano
You should do
discontiguous(female/1)
discontigous is a directive. To be executed, it must be given as a goal.
The correct text is:

:- discontiguous(female/1).
female(joan).
male(david).
male(paul).
female(rachel).

Regards, Ali.
Post by Luis Quintano
Post by carlos calderon
hi all,
female(joan).
male(david).
male(paul).
female(rachel).
Well, if i try to compile this, it gives me a warning: discontiguous predicate female/1.
Ok, I can change the order of my predicate to make them "contiguous" but that's not a proper solution.
discontiguous(female).
female(joan).
male(david).
male(paul).
female(rachel).
but it didn't. I got the same warning.
Again, apologies if the question has been answered before but I am new to the list and on the steep end of prolog's learning curve.
-Carlos
carlos calderon
2001-05-04 12:00:00 UTC
Permalink
yeap...

cheers, Ali
----- Original Message -----
From: "ED-DBALI AbdelAli" <AbdelAli.ED-***@lifo.univ-orleans.fr>
To: "Luis Quintano" <***@uevora.pt>
Cc: <users-***@gnu.org>
Sent: Friday, May 04, 2001 12:42 PM
Subject: Re: discontiguous predicate
Post by ED-DBALI AbdelAli
Post by Luis Quintano
You should do
discontiguous(female/1)
discontigous is a directive. To be executed, it must be given as a goal.
:- discontiguous(female/1).
female(joan).
male(david).
male(paul).
female(rachel).
Regards, Ali.
Post by Luis Quintano
Post by carlos calderon
hi all,
female(joan).
male(david).
male(paul).
female(rachel).
Well, if i try to compile this, it gives me a warning: discontiguous predicate female/1.
Ok, I can change the order of my predicate to make them "contiguous"
but that's not a proper solution.
Post by ED-DBALI AbdelAli
Post by Luis Quintano
Post by carlos calderon
I went to the gnu_prolog manual, pag-42 section 5.1.5 and based upon
discontiguous(female).
female(joan).
male(david).
male(paul).
female(rachel).
but it didn't. I got the same warning.
Again, apologies if the question has been answered before but I am new
to the list and on the steep end of prolog's learning curve.
Post by ED-DBALI AbdelAli
Post by Luis Quintano
Post by carlos calderon
-Carlos
_______________________________________________
Users-prolog mailing list
http://mail.gnu.org/mailman/listinfo/users-prolog
Loading...