Re: Problem regarding soft cut(*->).

From: Jinyi <yj021578_at_inf.tu-dresden.de>
Date: Thu 02 Jan 2003 04:54:11 PM GMT
Message-ID: <002601c2b27f$95f705e0$c4e11e8d@king1978>
Hi Joachim,

            thanks for your help!

> This is a bit of an anomaly in Eclipse: it will only work when
> the *-> occurs in compiled code. I.e. if you compile a clause like
>
> p(X,Y) :- ( member(X,[1,3]) *-> Y #= X+1; Y #=0 ).
>
> you will be able to call p(X,Y).
>
>
        That is exactly what I want, since I'm writing a compiler which
        generates clauses with soft cuts in their bodies.

> A more general point is: what do you want to achieve here?
> The meaning of
>     member(X,[1,3]) *-> Y #= X+1 ; Y #=0
> is quite difficult to understand, I doubt that it does what
> you want. Why not simply:
>     member(X,[1,3]), Y #= X+1 ; Y #=0

       Sorry for the confusion, the example I given is just a toy.

Cheers,
Jinyi
Received on Thu Jan 02 17:42:40 2003

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