Re: retractall/1 doesnot work?
- From: Duncan Patton <campbell@xxxxxxxxxx>
- Date: Sat, 15 Oct 2005 08:23:17 GMT
On Thu, 13 Oct 2005 12:43:02 +0200
Bart Demoen <bmd@xxxxxxxxxxxxxxxxx> wrote:
> shwdai wrote:
> > ?- listing.
> >
> > :- dynamic shwdai/3
> >
> > shwdai(a,b,c).
> >
> > Yes
> > ?- retractall(shwdai).
> >
> > Yes
> > ?- listing.
> >
> > :- dynamic shwdai/3
> >
> > shwdai(a,b,c).
> >
> > Yes
> >
> > why the dynamic predicate shwdai/3 exists yet?
> >
>
> Because retractall should be called with a literal, not with
> just the name of the predicate. Try retractall(shwdai(_,_,_)).
> [and read the manual as well]
>
more simply, retractall(shwdai) refers to shwdai/0.
Dhu
> Cheers
>
> Bart Demoen
--
???????????????????????????????????????
Can't get good help?
Contact Fubar the Hack: fubar AT neotext.ca
Area code seven eight zero, Exchange four six six, Local zero one zero nine
Highland terms, Canadian workmanship.
All persons named herein are purely fictional victims
of the Canidian Bagle Breeder's Association.
Save the Bagle!
Sun Ðhu
???????????????????????????????????????
.
- References:
- retractall/1 doesnot work?
- From: shwdai
- Re: retractall/1 doesnot work?
- From: Bart Demoen
- retractall/1 doesnot work?
- Prev by Date: Re: How to write a hook predicate for my own predicate
- Next by Date: comp.lang.prolog Frequently Asked Questions
- Previous by thread: Re: retractall/1 doesnot work?
- Next by thread: How to write a hook predicate for my own predicate
- Index(es):