home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / prolog / 2061 < prev    next >
Encoding:
Internet Message Format  |  1992-11-11  |  1.3 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!iggy.GW.Vitalink.COM!cs.widener.edu!dsinc!ub!acsu.buffalo.edu!ubvmsb.cc.buffalo.edu!v104n55k
  2. From: v104n55k@ubvmsb.cc.buffalo.edu (David I Schwartz)
  3. Newsgroups: comp.lang.prolog
  4. Subject: Re: Retract static clauses, can't ?
  5. Message-ID: <BxKLHy.Foy@acsu.buffalo.edu>
  6. Date: 11 Nov 92 21:11:00 GMT
  7. References: <92316.113830U37956@uicvm.uic.edu>
  8. Sender: nntp@acsu.buffalo.edu
  9. Organization: University at Buffalo
  10. Lines: 24
  11. News-Software: VAX/VMS VNEWS 1.41
  12. Nntp-Posting-Host: ubvmsb.cc.buffalo.edu
  13.  
  14. > In article <92316.113830U37956@uicvm.uic.edu>, U37956@uicvm.uic.edu writes...
  15. > >Using Sicstus2.1 Prolog, I want to retract some facts (or clauses) which
  16. > >were loaded from a file.
  17. > >   Suppose in  mfile, there are facts:
  18. > >          johnlikes(mary).
  19. > >          marylikes(tom).
  20. > > 
  21. > >After starting prolog, i load the facts in the following way:
  22. > >   |- ? [Omfile].
  23. > > 
  24. > >When I try to remove a fact, such as:
  25. > >   |- ? retract((marylikes(tom))).
  26. > > 
  27. > >I got error message which says static terms can't be retracted.
  28. > > 
  29. > >How can i retract the facts and how can i made the facts dynamic ?
  30. > > 
  31. > >Could anyone tell me?
  32. > > 
  33. > >Thanks in advance.
  34.  
  35. You can try abolish (ie, abolish(marylikes/1) ) but it is rather extreme.
  36.  
  37. Dave
  38.