From tob@world.std.com Mon Sep 17 23:24:42 2001
Received: from localhost.std.com (ppp0b181.std.com [208.192.101.181])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f8HLOev05464
	for <prolog@swi.psy.uva.nl>; Mon, 17 Sep 2001 23:24:40 +0200 (MET DST)
Received: (from Tehom@localhost)
	by localhost.std.com (8.9.3/8.9.3) id RAA00740;
	Mon, 17 Sep 2001 17:19:57 -0400
X-Authentication-Warning: localhost.std.com: Tehom set sender to tob@world.std.com using -f
To: Steve Prior <sprior@geekster.com>
Cc: prolog@swi.psy.uva.nl
Subject: Re: [SWIPL] Getting Started with SWI
References: <3BA517FC.A98C5AD4@geekster.com>
From: Tom Breton <tob@world.std.com>
Date: 16 Sep 2001 20:45:14 -0400
In-Reply-To: Steve Prior's message of "Sun, 16 Sep 2001 17:22:04 -0400"
Message-ID: <m3r8t6abmt.fsf@world.std.com>
User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Lines: 26

Steve Prior <sprior@geekster.com> 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

