Hi Jess users,
I have the following function:
(deffunction similarity-score (?base ?other)
(bind ?score 0)
(bind ?totalDistance 0)
(bind ?counter 0)
(foreach ?x ?base
(bind ?counter (+ ?counter 1))
(printout t counter is: ?counter)
(bind ?partialDistance
Did you try the
(break)http://www.jessrules.com/jess/docs/71/functions.html#breakfunction?
Arguments:NoneReturns:N/ADescription: Immediately exit any enclosing loop
or control scope. Can be used inside of
forhttp://www.jessrules.com/jess/docs/71/functions.html#for,
while