users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: discontiguous predicate


From: ED-DBALI AbdelAli
Subject: Re: discontiguous predicate
Date: Fri, 04 May 2001 13:42:14 +0200

Luis Quintano wrote:

> 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.

> On 04 May 2001 11:42:31 +0100, carlos calderon wrote:
> > 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]