Four Easy Question

From: Linux Man (steven_82m_at_hotmail.com)
Date: 03/21/04


Date: 20 Mar 2004 22:19:20 -0800

Hi

I'm new in prolog and have some easy question:

1- How can I create a file in prolog?

2- How can I read from a file or check that, say "john is father of
bob" (father(john, bob)), from that file?

3- How can I write a new predicate in the created file
(e.g. father(jim, alice).)?

Many Thanks
Steve



Relevant Pages

  • Re: Four Easy Question
    ... >I'm new in prolog and have some easy question: ... >1- How can I create a file in prolog? ... >bob" ), from that file? ... Jeff Gaines - Damerham Hampshire UK ...
    (comp.lang.prolog)
  • Re: Four Easy Question
    ... > 1- How can I create a file in prolog? ... > bob" ), from that file? ... Then assert the new fact, with "assert)". ... Assert any new facts you want, and retract any facts you want to delete. ...
    (comp.lang.prolog)
  • Re: How to convert a problem to prolog code
    ... it is mainly about how to write a reasonable fact. ... Bob is a human, then Bob will die one day. ... I think this is how to translate the problem into prolog according to ...
    (comp.lang.prolog)
  • Re: Sublists question
    ... I do not really get what the predicate means or does. ... >>helps just to write the predicate out clearly in natural language, ... >>then translate into Prolog. ... more as a functional programming language than as a logic ...
    (comp.lang.prolog)
  • Re: Prolog module system
    ... I think prolog offers so much freedom that one can build its own ... Both modules define a member/2 predicate, ... this leads to a name conflict. ... shaky ground as current module systems (look at the issues with e.g. ...
    (comp.lang.prolog)