logo       

[ xsb-Bugs-1805758 ] when/2 doesn't return the result of executing delayed : msg#00407

Subject: [ xsb-Bugs-1805758 ] when/2 doesn't return the result of executing delayed goal?
Bugs item #1805758, was opened at 2007-10-01 11:57
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=101176&aid=1805758&group_id=1176

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Hui Wan (hwan)
Assigned to: Nobody/Anonymous (nobody)
Summary: when/2 doesn't return the result of executing delayed goal?

Initial Comment:
Hi,

Does when(Condition, Goal) return the value of executing Goal? I had thought it 
does, and wrote a try.P as follows:
:- import when/2 from constraintLib. 
:- import ground/1 from basics.

/*  if 3>X, true; o/w false */
r(X) :- when(ground(X),3>X).

After loading it, I tried
| ?- _X is 1+3, r(_X).
no 
which is correct, but for
 | ?- r(_X), _X is 1+3.
yes
when/2 doesn't return 3>4 : false

Is there anything wrong with the usage or sth? 

Thank you very much for your help!

Hui


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=101176&aid=1805758&group_id=1176

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/


<Prev in Thread] Current Thread [Next in Thread>