Subject: Re: [SWIPL] Getting Started with SWI

From: Tom Breton <[email-masked]>
Date: 16 Sep 2001 20:45:14 -0400

Steve Prior <[email-masked]> writes:

> I haven't used Prolog in quite a while, but wanted to play a bit with
> SWI.  I've got it installed and am trying to do the classic hello world
> type program for Prolog - friends(X,Z).
> 
> In SWI, is it possible to type new predicate definitions on the
> interactive command
> line or do you HAVE to load them from a file?  I typed:
> 
> ?- friends(X,Z):-
> |      friends(X,Y),
> |      friends(Y,Z).
> ERROR: Undefined procedure: (:-)/2
> ?-
> 

You need to type 

        [user].

before defining rules, and ^D when you're done.

-- 
Tom Breton, http://world.std.com/~tob