Good day! From Jess 7 at URL
http://herzberg.ca.sandia.gov/jess/docs/70/queries.html#in_java
***********************************************************************
import jess.*;
public class ExQuery {
public static void main(String[] argv) throws JessException {
Rete engine = new Rete();
engine.batch("query.clp");
engine.reset();
QueryResult result =
engine.runQueryStar("search-by-name", new
ValueVector().add("Smith"));
while (result.next())
{
System.out.println(result.getString("fn") + " " +
result.getString("ln")
+ ", age" + result.getInt("age"));}
***********************************************************************
Is there a equivalent of the bolded QueryResult result in Jess 6.1? Such as
I am still able to printout the fact's slot values perhaps like this
Value firstname = result.get("fn");
System.out.println(firstname.toString());
I have try to replace it with the following but can't get it to work. After
searching the book and docs, I could not find a exact example. I keep
getting a null vaule
Iterator result = r.runQuery ("search-by-name", new
ValueVector().add(Smith));
Value firstname = r.fetch("fn");
System.out.println("\n what is first name " + fn);
thanks and rgds
rick
--
View this message in context:
http://www.nabble.com/Does-Jess-6.1p4-has-the-equivalent-of-%22QueryResult-result%22-tf3465985.html#a9670220
Sent from the Jess mailing list archive at Nabble.com.
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------