Asserting facts and performing queries on it.

From: Sathish Kumar Murugesan <>
Date: Tue 03 Apr 2001 05:02:53 PM GMT
Message-ID: <>

I need to construct a database which has 4 fields.
Say, if I need to have a template book with 4 fields -
author, year, title and publisher. I used 'assert' to
assert the fact in the database.

But how do I perform query on it? Say if I have lots
of books ranging from 1990-2000 and how do I pick up
the ones with the year as 1996?

I tried to used the functor name directly and used 
EC_atom year("1996");

and tried to perform the query on it 

post_goal(term(EC_functor(book(ECREF1, year, ECREF2,

But I am not getting any result for this. However, if
I use another EC_ref instead of EC_atom for the year,
it picks up the first fact from the database.

How do I get past this and perform query on it, and
get just what I want from the database? And how do I
get more than one query result, in my C++ and Eclipse
integrated program?

Thanks in advance,

Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
Received on Tue Apr 03 18:04:44 2001

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:08 PM GMT GMT