From jan@swi.psy.uva.nl Mon Feb 12 10:46:45 2001
Received: from gollem.swi.psy.uva.nl (root@gollem [145.18.152.30])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f1C9kjZ25081;
	Mon, 12 Feb 2001 10:46:45 +0100 (MET)
Received: from localhost (localhost [[UNIX: localhost]])
	by gollem.swi.psy.uva.nl (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id KAA17568;
	Mon, 12 Feb 2001 10:46:45 +0100
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Organization: SWI, University of Amsterdam
To: "Douglas R. Miles" <dmiles@teknowledge.com>,
   "'prolog@swi.psy.uva.nl'" <prolog@swi.psy.uva.nl>
Subject: Re: [SWIPL] Vars/4
Date: Mon, 12 Feb 2001 10:43:23 +0100
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
References: <EE25484266A64A47AE06CFC47C64232B1A1983@helium.teknowledge.com>
In-Reply-To: <EE25484266A64A47AE06CFC47C64232B1A1983@helium.teknowledge.com>
MIME-Version: 1.0
Message-Id: <01021210450403.17077@gollem>
Content-Transfer-Encoding: 8bit

Douglas,

On Sat, 10 Feb 2001, Douglas R. Miles wrote:

>vars(I, N, Term, V0, V) :-
>    (   (I > N) -> true
>    ;   arg(I, Term, Arg),
>	vars(Arg, V0, V1),
>	J is I + 1,
>	vars(J, N, Term, V1, V)
>    ).

Any Prolog system this has worked on is buggy.  The 2nd line should be

        (I > N) -> V=V0

	Cheers --- Jan

