users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: variable fonction


From: Gilles Dégottex
Subject: Re: variable fonction
Date: Thu, 27 Mar 2003 20:23:02 +0100
User-agent: KMail/1.5

On Monday 24 March 2003 15:07, Lindsey Spratt wrote:
> On Monday, March 24, 2003, at 06:24  AM, Gilles Dégottex wrote:
> >             eval( A(B, C), R) :- A \= /, eval(B,Be), eval(C,Ce), R is A(Be, 
> > Ce).
>
> GProlog does not support variable functors. You need to use univ
> ('=..') instead.
> You might write this function as:
>
> eval( Term, R) :-
>       Term =.. [A, B, C],
>       A \= /,
>       eval(B, Be),
>       eval(C, Ce),
>       EvalTerm =.. [A, Be, Ce],
>       R is EvalTerm.

ok, thx, but because we use win-prolog at university I have to do it with 
variable functors ... when standard meet windows implementation ...

thanks for all
Gilles




reply via email to

[Prev in Thread] Current Thread [Next in Thread]