Re: odd thing in eclipse

From: Joachim Schimpf <j.schimpf_at_icparc.ic.ac.uk>
Date: Wed 16 Nov 2005 10:49:44 AM GMT
Message-ID: <437B0EC8.6030905@icparc.ic.ac.uk>
A.M.L.Fowler wrote:
> Hiya, can anyone tell me why, given a fact of this type:
> 
>      num( 10, 25).
> 
> does eclipse allow this:
> 
>      [eclipse 1]:  X is num(Y).
>      X = 25
>      Y = 10
> 
> Other Prolog's I've used would give a domain error here.

This is Eclipse's mechanism to evaluate user-defined arithmetic
functions, as described in the manual
http://www.icparc.ic.ac.uk/eclipse/doc/userman/node47.html#SECTION00832000000000000000
Any error checking (e.g. checking whether the first argument of
num/2 is a variable) must be done by the user-defined function
itself. Does this cause you any problems?


-- 
  Joachim Schimpf              /             phone: +44 20 7594 8187
  IC-Parc                     /      mailto:J.Schimpf@imperial.ac.uk
  Imperial College London    /    http://www.icparc.ic.ac.uk/eclipse
Received on Wed Nov 16 10:52:10 2005

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:40 PM GMT GMT