• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

defquery example from book not working for release > 6.1

 
Michael Cobburn
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is the following example extracted from Jess in Action

(defquery find-affordable-gifts
(declare (variables ?lower ?upper))
(gift (price ?p& and (> ?p ?lower) (< ?p ?upper))))
)

is generating the following message:

Jess reported an error in routine HasLHS.addPattern
Message: Variable used before definition: lower

What is the updated correct writing of the defquery?
Again it is working fine in 6.1 p6 not in 7.0 a1

Thanks, Michael
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Michael,

Welcome to JavaRanch!

This is a bug. Jess 7.0a1 just came out on Friday, but this bug has already been reported. There will be a 7.0a2 soon that will fix the reported bugs and add some more new stuff.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic