From fer@math.binghamton.edu  Thu Jun 10 20:28:01 1999
Received: from math.binghamton.edu (math.binghamton.edu [128.226.2.4])
	by swi.swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id UAA05692
	for <prolog@swi.psy.uva.nl>; Thu, 10 Jun 1999 20:27:57 +0200 (MET DST)
Received: (from fer@localhost)
	by math.binghamton.edu (8.9.3/8.9.3) id OAA11713;
	Thu, 10 Jun 1999 14:27:56 -0400 (EDT)
From: Fernando Guzman <fer@math.binghamton.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <14176.940.432441.670426@macondo>
Date: Thu, 10 Jun 1999 14:27:56 -0400 (EDT)
To: "H. Chad Lane" <hcl@cs.pitt.edu>, prolog@swi.psy.uva.nl
Subject: RE: using call
In-Reply-To: <375FFB1F.63B769AF@cs.pitt.edu>
References: <375FFB1F.63B769AF@cs.pitt.edu>
X-Mailer: VM 6.53 under Emacs 20.2.1

H. Chad Lane writes:
 > I am trying to use call with a conjuctive goal, and am running into
 > problems.  If this is not an SWI specific question, I apologize, but
 > most sources I've found mention that the treatment of call is often
 > implementation dependent.
 > 
 > For example, given the facts:
 > 
 >   father(jim,greg).
 >   father(greg,al).
 > 
 > this query works as expected:
 > 
 >   ?- father(jim,X), father(X,al).
 > 
 >   X = greg 
 > 
 > However, when call is used it gets confused with call/2:
 > 
 >   ?- call(father(jim,X), father(X,al)).

Chad,
  what you need in order to get the conjunction is an extra pair of
parenthesis.  Try:

5 ?- call((father(jim,X), father(X,al))).
 
X = greg 

-- 
Fernando Guzman
fer@math.binghamton.edu

