Subject: Re: using call

From: [email-masked] (Uwe Lesta)
Date: Thu, 10 Jun 1999 20:35:12 +0200

H. Chad Lane schrieb:
> 
> 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)).
>   [WARNING: Undefined procedure: father/3
>       However, there are definitions for:
>           father/2]
>      Exception: (  7) father(jim, _G298, father(_G298, al)) ?
> 
> Any suggestions would be appreciated.  Thank you!

Try one more pair off brackets around the term , to be sure that call/1
is used.

e.g. 

call( (father(jim,X), father(X,al)) ).

-- 

Regards

Uwe
[email-masked]