next up previous contents
Next: Prolog: queries and rules Up: Prolog: facts Previous: Prolog: facts

 

Responses

The result of this into Prolog and then querying the database with the query mother(X,Y). is:

dee /home/gibbon/Prolog: sicstus
SICStus 3  #3: Tue Dec 17 15:08:48 MET 1996
| ?- assertz(mother(sue,john)).

yes
| ?- assertz(mother(sue,anne)).

yes
| ?- mother(X,Y).

X = sue,
Y = john ? ;

X = sue,
Y = anne ? ;

no
| ?-



Dafydd Gibbon
Fri Nov 28 02:24:58 MET 1997