JESS: breaking loops broken

2007-06-11 Thread Wolfgang Laun
Jess Version 7.0p1 12/21/2006 Using return to break a (for) or (foreach) is documented behaviour. (It isn't for (while), but perhaps this is just an omission in the documentation.) However: ;; Using return to exit from a loop confuses Jess. ;; Loops won't work any more. A (clear) appears to

Re: JESS: breaking loops broken

2007-06-11 Thread Ernest Friedman-Hill
I think you'll find that any of the loops below will work fine in a context where return has a defined meaning: in particular, in a deffunction or the RHS of a defrule. I could weasel out of this by calling this undefined behavior, as returning from a loop at the prompt has no useful

Re: JESS: breaking loops broken

2007-06-11 Thread Wolfgang Laun
16.70 and 16.71 probably shouldn't mention return at all; this was indeed leading me up the garden path. (I was thinking of (for) and (foreach) as some inline function definition plus call, and that's why you can use return to break from them.) Ernest Friedman-Hill wrote: I think you'll