Hello!
I am trying to upgrade from Jess 3.2 to 4.1. I am having trouble
converting with some userfunctions I wrote for dates. I have some rules
like:
(defrule age_in_year_Rule
(declare (salience 40))
(birthdate ?bithd)
=>
(assert (age_in_year (date-calls "YEARS_SINCE" "%birthdate%")))
)
(defrule age_in_month_Rule
(declare (salience 40))
(birthdate ?bithd)
=>
(assert (age_in_month (date-calls "MONTHS_SINCE" "%birthdate%")))
)
In the userfunction, I get the value of the fact (birthdate) using the
rete.facts vector and calculate the requested value for return. In the
new rete there is no facts vector. There is a m-facts vector, which my
complier says is not accessible from my implements Userfunction. There
is also a factList that returns a string.
It has been while since I wrote the rules, so I can't recall why
date-calls is invoked with the fact name rather than the fact value,
which would eliminate the need to get the fact value in the function.
What Jess syntax could I use to pass the value of fact "birthdate"
rather than the name?
Any ideas?
Thanks
Christo
---------------------------------------------------------------------
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]
---------------------------------------------------------------------