Ernest,
After applying suggested fix small example I wrote works. Unfortunately it
seems that matching
Java Beans doesn't work any more. I noticed that not only on my code, but
on examples
like "jess\examples\pumps".


[EMAIL PROTECTED] wrote:


>I think [EMAIL PROTECTED] wrote:
>
>> Ernest,
>> Thanks for the answers to my previous questions, now I have another one.
>> Could you please explain why following code behaves differently in Jess
4.3
>> and 5.0a3:
>>
>> (deftemplate param
>>   (multislot groups))
>>
>> (defrule test-empty-multislot
>>   ?f <- (param (groups))
>>   =>
>>   (modify ?f (groups 1))
>>   (printout t "modified" crlf))
>>
>> (assert (param))
>> (run)
>>
>> In Jess 4.3 rule "test-empty-multislot" executes once.
>> In Jess 5.0a3 it enters infinite loop.
>>
>> Thanks.
>>
>> Miroslav Madecki, I/T specialist - RS/6000
>>    Internet: [EMAIL PROTECTED]
>>     Tel: +385-1-6308-156, Fax: +385-1-6111-119
>>     IBM Croatia, Lastovska 23, 10000 Zagreb, Croatia
>>
>
>
>This one is a bug - thanks for finding it. You have to make two
>trivial changes to fix this: in jess/ReteCompiler.java, at line 296,
>change
>            if (p.getSlotLength(j) != 0)
>
>to
>
>            if (p.getSlotLength(j) != -1)
>
>And in jess/Pattern.java, at line 335, change
>
>        return 0;
>to
>        return -1;
>



Miroslav Madecki, I/T specialist - RS/6000
   Internet: [EMAIL PROTECTED]
    Tel: +385-1-6308-156, Fax: +385-1-6111-119
    IBM Croatia, Lastovska 23, 10000 Zagreb, Croatia


---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to