The next method returns FALSE if there are no more records, which in your case
probably means that there were no records returned at all. It would be good
practice to always check the return value of next even if you expect at least
one record from the defquery call. I have successfully used d
Hi Marcin,
First of all, be careful how you do your pattern matching. The symbol
frog
and the string
"frog"
are not the same things. This was causing a problem in your (pet-kind)
rule. BTW -- It also helps to be consistent in how you name your
variables. I prefer being verbose rath
Hello everyone,
I'm new to Jess and struggling with making one example work, based on
problem from http://en.wikipedia.org/wiki/Backward_chaining
The goal is to find the pet's color if given that pet is a frog or a
canary.
I have defined such rules:
===
(do-backward-chaining color)
Hi,Thanks Mr. Kirby for the response,
As I mentioned in my previous email, I've called next in my program's
deffunction running-query [(?result next)], but why does it return false? I
think the problem is caused by calling the defquery within a deffuction.
Does anyone know a better way of connectin
Thanks for providing the function ;)
On Aug 25, 2008, at 3:55 AM, Wolfgang Laun wrote:
Thanks for finding this bug.
You have seen that this can (now) be done using the builtin call.
Just to set the record straight, the fix should be in one if earlier,
where we test that some things have to be
Yea, asserting before defining the rule definitely has a tendency to
make things confusing...
On Aug 24, 2008, at 8:42 PM, Jason Morris wrote:
Hi Hal,
Clean up your code a bit, and I think it works fine. :-)
; hal.clp
(clear)
(watch all)
(deftemplate functional-fact
(slot func))
(defrul
All last week we did testing on both internal and customer environments.
Could never replicate the issue on our internal environments. On the
customer environment the issue is reproducible, however, there is not a
set of steps to reproduce consistently. The issue either does/does not
manifest its
On Tue, Aug 19, 2008 at 8:52 AM, Jan Willem Lokin <[EMAIL PROTECTED]> wrote:
> I'd like to use a rule of the following form:
>
> (defrule rule557
>(logical
>(is-active (name "Some name"))
>(in-coverage (tid ?tid) (cid ?cid) (distance ?distance&:(> 2
> (count-query-results in-cov
This can be done by binding the entire fact, as in a rule's LHS.
(defquery allPersons ?p <- (Person))
(bind ?res (run-query* allPersons))
(while (?res next)
(bind ?person (?res get p))
(modify ?person (visited TRUE))
)
On Mon, Aug 11, 2008 at 12:44 PM, Borislav Bonev <[EMAIL PROTECTED]>
Thanks for finding this bug.
You have seen that this can (now) be done using the builtin call.
Just to set the record straight, the fix should be in one if earlier,
where we test that some things have to be evaluated in the current
context before we really know what we have.
if (valArg1.t
10 matches
Mail list logo