Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

defquery example from book not working for release > 6.1

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic