Tanks Bart. So I can create new predicates . I don´t touch prolog since the times of my Sinclair Spectrum. By the way, The Ciao-emacs integration is wonderful. I´m involved in a meta-programming project in which I need also to modify already asserted predicates . Can I get the definition of a clause and manage his body either as a list or as any other serial object that Ciao may have or, else, I must keep a copy of the asserted clause definitions in variables? On 8/23/05, Bart Demoen <Bart.Demoen(a)cs.kuleuven.ac.be> wrote:
can I assert and retract not only facts, but also dynamic clauses
with variables such are:
isSoon(Father, Son):-isFather(Son Father)
Yes you can. Try:
?- assert((iknow(X) :- ireadthemanualabout(X))).
yes ?- iknow(assert).
:-)
Bart Demoen
You probably want clause/2:
?- assert((iknow(X) :- ireadthemanualabout(X))).
yes ?- clause(iknow(X),Body).
Body = 'user:ireadthemanualabout'(X) ? ;
no
Cheers
Bart Demoen
============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------