users-prolog
[Top][All Lists]
Advanced

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

Help- error in executing "retract" predicate


From: Vidhya Subramanian
Subject: Help- error in executing "retract" predicate
Date: Wed, 27 Feb 2002 04:52:24 -0800 (PST)

Respected sir/madam,
       i am using "SWI-Prolog" to find a solution for
timetabling problem. here is a small piece of code

================ code ============================

sam(1).
soln:-sam(X),retract(sam(X)),write(success).

==================================================

        this code on execution gives the following
error

================= error ===========================

[succ].
% succ compiled 0.00 sec, 0 bytes

Yes

?- soln.
ERROR: No permission to modify static_procedure
`sam/1'
^  Exception: (7) retract(sam(1)) ? retry
[retry]
^  Call: (7) retract(sam(1)) ? creep
ERROR: No permission to modify static_procedure
`sam/1'
^  Exception: (7) retract(sam(1)) ? creep

======================================================

      i want to use "assert" and "retract" to add
facts and delete facts from the database.
      can anyone help me to find the error in my
program and to execute these 2 commands

                thanking you,

yours faithfully,
vidhya

__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com



reply via email to

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