Hello everyone,
This is my first post to the forum. Also, I am working on my first project
is jess. I hereby provide a part of my code i am having difficulties with.
(deftemplate securitylevel
(slot budgetscore)
(slot metricnumber)
)
(deftemplate security_budget
(slot secbudget)
(slot techbudget)
)
(defrule secbudget
(and (security_budget (secbudget ?sb)(techbudget ?tb)))
=>
(bind ?ans (/ ?sb ?tb))
(bind ?ans1 (* ?ans 100))
(printout t "Security Budget level achieved " ?ans1 "%"crlf))
;;;;;;; now here i wish to save the ans1 value in some variable which can be
accessed, modified and displayed from any other defrule
Earlier I thought of creating one more slot in securitylevel template to
save the ans1 value and thus can be accessed from any other defrule. But I
did not work. Also, since i need to display it, after modifying it dint work
for me.
Can anyone help me with this?
Thanks in advance.
Vishal
--
View this message in context:
http://www.nabble.com/storing-and-printout-a-global-variable-tp21845524p21845524.html
Sent from the Jess mailing list archive at Nabble.com.
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [email protected]'
in the BODY of a message to [email protected], NOT to the list
(use your own address!) List problems? Notify [email protected].
--------------------------------------------------------------------