help for a french teatcher

View: New views
3 Messages — Rating Filter:   Alert me  

help for a french teatcher

by Georges Arsouze :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello
I'm beginning with SWI-Prolog (Multi-threaded, Version 5.6.47)

I'have confectionphrase.pl like that

sujet(s1).
sujet(s2).
sujet(s3).
verbe(v1).
verbe(v2).
complement(c1).
complement(c2).



phrase(S,V,C):-sujet(S),verbe(V),complement(C).


when i write
consult('/Volumes/500GO/Prolog/LearnProlog/Ch2/confectionphrase.pl').

i obtain
No permission to modify static_procedure `phrase/3'

I have read the faq
I try dynamic, abolishn, retractall .....
It doesn't work
Ca you help me
Regards
_______________________________________________
SWI-Prolog mailing list
SWI-Prolog@...
https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog

RE: help for a french teatcher

by Stony Zhang-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I tried confectionphrase.pl you wrote, and it worked.
I don't know what's wrong in you PC, maybe you can change the name of the
functor phrase, such as phrase_1. Because SWI contail a build-in term
phrase, maybe has some conflict if you use it in your program.

Thanks
Stony

-----Original Message-----
From: swi-prolog-admin@...
[mailto:swi-prolog-admin@...] On Behalf Of Georges Arsouze
Sent: Monday, June 29, 2009 1:06 PM
To: swi-prolog@...
Subject: [SWIPL] help for a french teatcher

Hello
I'm beginning with SWI-Prolog (Multi-threaded, Version 5.6.47)

I'have confectionphrase.pl like that

sujet(s1).
sujet(s2).
sujet(s3).
verbe(v1).
verbe(v2).
complement(c1).
complement(c2).



phrase(S,V,C):-sujet(S),verbe(V),complement(C).


when i write
consult('/Volumes/500GO/Prolog/LearnProlog/Ch2/confectionphrase.pl').

i obtain
No permission to modify static_procedure `phrase/3'

I have read the faq
I try dynamic, abolishn, retractall .....
It doesn't work
Ca you help me
Regards
_______________________________________________
SWI-Prolog mailing list
SWI-Prolog@...
https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog


_______________________________________________
SWI-Prolog mailing list
SWI-Prolog@...
https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog

Re: help for a french teatcher

by Richard O'Keefe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Jun 29, 2009, at 5:05 PM, Georges Arsouze wrote:
> I'have confectionphrase.pl like that
...
phrase(S,V,C):-sujet(S),verbe(V),complement(C).
>
>
>
> No permission to modify static_procedure `phrase/3'
>
> I have read the faq
> I try dynamic, abolishn, retractall .....
> It doesn't work
> Ca you help me

Yes.  Give your predicate a different name.

There _is_ a way you can do what you think you want,
and if you go looking for 'redefine' in the manual you
will find it.  But if you start redefining system
predicates left right and centre pretty soon you will
be in real trouble, needing something you have got rid
of.  In particular, showing your code to anyone else is
likely to confuse them.

I suggest calling it mon_phrase/3  or something like that.

_______________________________________________
SWI-Prolog mailing list
SWI-Prolog@...
https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog