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

From: Jinyi <yj021578_at_inf.tu-dresden.de>
Date: Thu 02 Jan 2003 08:59:44 PM GMT
Message-ID: <005601c2b2a1$e0e7ed90$c4e11e8d@king1978>
>
> 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).
>

  I still got problem:

  have the toy program follows compiled
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:-lib(fd).
:-op(1050, xfx, *->).
:-import (*->)/2 from sepia_kernel.

p(X,Y) :- member(X,[1,3]) *-> Y = odd ;  member(X,[2,4]) *-> Y = even.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 It works when quering ?- p(X,Y).

 But query ?- p(2,Y).
System prompts following error message:
calling an undefined procedure sepia_kernel : (member(2, [2, 4]) *-> Y=even)
in module eclipse
Abort

Does that mean we cannot have nested soft cuts?

Cheers,
Jinyi
Received on Mon Jan 06 10:16:49 2003

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