From paul@inet.co.za  Thu May 11 15:50:18 2000
Received: from exchange_rbk02.inet.co.za (exchange-rbk02.inet.co.za [196.38.91.22])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id PAA27531
	for <prolog@swi.psy.uva.nl>; Thu, 11 May 2000 15:50:16 +0200 (MET DST)
Received: from pdev.inet.co.za ([196.14.60.35]) by exchange_rbk02.inet.co.za with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21)
	id KWTBDXHP; Thu, 11 May 2000 15:51:40 +0200
Date: Thu, 11 May 2000 17:38:25 +0200 (GMT+0200)
From: Paul Sephton <paul@inet.co.za>
To: Lionel Ains <lains@caramail.com>
cc: prolog@swi.psy.uva.nl
Subject: Re: operators
In-Reply-To: <958044921023797@caramail.com>
Message-ID: <Pine.LNX.3.91.1000511173805.17823A-100000@pdev.inet.co.za>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Spoilsport!

On Thu, 11 May 2000, Lionel Ains wrote:

> > -------Message d'origine-------
> > De : "Politini, Cohen" <CPolitini@colonial.com.au>
> > Date : 11/05/100 04:58:20
> >=20
> > I want to declare an operator 'c', so I wrote
> >=20
> > :-op(1000,yfx,c).
> >=20
> > Then now I want to say that the 'c' in NcR represents=20
> something like
> >=20
> > operator c =3D ((N+N) - R)*R.
> >=20
> > Cansomeone help me ??
> 
> Then you should add to your program:
> 
> :- arithmetic_function(c/2).
> c(N, R, Result):-
>   Result is (((N + N) - R) * R).
> 
> (see chapter 3.28 of the SWI-Prolog manual for details).
> 
> And the ?- X is (10 c 45).
> Should be interpreted correctly.
> Note: ?- X is (10c45) won't work because Prolog will then=20
> read 10c45 as one atom.
> 
> Lionel
> 
> ______________________________________________________
> Bo=EEte aux lettres - Caramail - http://www.caramail.com
> 
> 

_____________________________________________________________________________
Paul Sephton (paul@inet.co.za)                               INET Development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ever wondered if jumping out of the frying pan might actually be refreshing?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

