Unformatted text preview: while is a boolean expression. The while function evaluates its first argument and, if it is true, evaluates all its other arguments. It repeats this procedure until the first argument evaluates to FALSE ; a while loop always returns FALSE. There are several other looping functions built into Jess; see the descriptions of for and foreach in the Jess function index. There is also a break function that can be used to abort loops as well as return early from the right-hand-side of a rule. 3.8.2. Decisions and branching The if function looks like this: Jess> (bind ?x 1) 1 Jess> (if (> ?x 100) then (printout t "X is big" crlf) elif (> ?x 50) then (printout t "X is medium" crlf) else (printout t "X is small" crlf))...
View Full Document
- Spring '10
- Subroutine, Control flow, Jess, Jess function guide