[Top][All Lists]

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

Re: asserta and assertz do different things???

From: Daniel Diaz
Subject: Re: asserta and assertz do different things???
Date: Fri, 26 Oct 2001 10:23:39 +0200

Hi, it is difficult to help you with so little information !
Could you send us more details ? In particular an source example showing the 
problem should be very

Thorsten Krebs wrote:
> Hi,
> I am new to PROLOG and want to use the GNU Prolog / C interface to
> manage constraint solving from a C program. But since I don't know
> Prolog well I have problems with it's semantics...
> I try get a little test program running which is a databse of ancestors.
> Entries a of the form "parent(bob, mary)." and the functions for queries
> are "anc(X,Y):-parent(X,Y)." and "anc(X,Y):-parent(X,Y),anc(Y,Z)."
> Now I use the assert directive to insert knowledge. No problem so far.
> But when I try to delete knowledge with retract... like
> "retract(parent(bob, mary))" I get different outputs from program wether
> I used the asserta oder the assertz directive... (?)
> Using assertz the only entry left in my database is the one I wanted to
> be deleted and using asserta my program crashes...
> What is the difference betrween these two assert's and does retract
> really delete knowledge or something else...
> I am really starting to feel weird about this...
> Thanks if anyone has a hint for me!

Daniel Diaz   address@hidden
gprolog --version 2>&1 | sed -n -e 's/By //p'

reply via email to

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