Hi Joao ,
One more thing to add...

Note that I'm not checking for duplicate names, however adding another slot
for last names and/or adding a unique "person id" slot to your person
deftemplate would fix this.

Cheers,
Jason

On Tue, Oct 14, 2008 at 11:43 AM, Joao Antunes Mourao <
[EMAIL PROTECTED]> wrote:

> Hello,
>
> I would like to know if is possible to make queries with conditions, like:
>
> (deftemplate (person (slot name) (slot age))
>
> ;(intended query)
> (defquery person-by-age
> (declare (variables ?age))
> (person (name ?name) (age (>?age)))
>
> Now, I have some persons inside the working memory and i would like to
> make something like this,
>
> (person-by-age 10)
>
> and it gives me the people which is older than 10 years. This is
> possible in some way? Moreover, how can i know who is the older in the
> database, only using a query? This is possible at all, or i need to do
> intermediate functions?
>
> Regards,
>
> Joao Mourao
>
> --------------------------------
> unclassified email
>
>
>
>
> ------------------------------------------------------------------------------------------------------------
> Disclaimer:
>
> If you are not the intended recipient of this email, please notify the
> sender and delete it.
> Any unauthorized copying, disclosure or distribution of this email or its
> attachment(s) is forbidden.
> Thales Nederland BV will not accept liability for any damage caused by this
> email or its attachment(s).
> Thales Nederland BV is seated in Hengelo and is registered at the Chamber
> of Commerce under number 06061578.
>
> ------------------------------------------------------------------------------------------------------------
>
>


--
-----------------------------------------------------------
Jason Morris
Morris Technical Solutions LLC
[EMAIL PROTECTED]
(517) 304-5883

Reply via email to