Bugs item #1805758, was opened at 2007-10-01 15:57
Message generated for change (Comment added) made by tswift
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: Closed
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
----------------------------------------------------------------------
>Comment By: Terrance Swift (tswift)
Date: 2007-10-03 23:43
Message:
Logged In: YES
user_id=13011
Originator: NO
This was indeed a bug. The fix is in CVS.
----------------------------------------------------------------------
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: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
|