Subject: RE: using call

From: Fernando Guzman <[email-masked]>
Date: Thu, 10 Jun 1999 14:27:56 -0400 (EDT)

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
[email-masked]