I think John Hossack wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi Everyone,
> 
> Does anybody know if it is possible to use the sub-string function within an exists 
>pattern?
> 


Sure. (exists) has to have a -pattern- in it, of course -- i.e.,
something that matches a fact. You can use sub-string on one of the
fields in the fact -- i.e., you could write

 (exists (groceries $? ?item&:(eq (sub-string 1 3 ?item) "egg") $?))

which would match if there was any grocery list that contained an item
starting with "egg".


---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

--------------------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to