Ernest, thanks for the link to sym-cat. I suggest to update the documentation on sym-cat as well (or add a comment to the section of the manual that talks about type handling) to point this out. I was looking for a function like sym-cat in the manual, but couldn't find it.
Michael On Wed, Aug 29, 2007 at 12:22:20PM -0400, Ernest Friedman-Hill wrote: > This has been reported before, and yes, it's a little bewildering; > but it makes perfect sense if you realize that you're calling a Java > method "getSymbol" which returns a String to Java. A future Jess > release should add some Userfunctions that deal with queries from a > Jess language perspective. > > You can convert anything to a symbol with the "sym-cat" function. > > On Aug 29, 2007, at 11:00 AM, Michael Atighetchi wrote: > > >Consider the following jess code: > > > > > >(deftemplate c_test1 > > (slot idtag) > >) > > > >(assert (c_test1 (idtag id1))) > > > >Now, I'm trying to access the idtag slot via the following query: > > > >(defquery get-id (WFACT::c_test1 (idtag ?id))) > > > >The problem that I'm seing is that run-query* returns a string, and > >not a symbol, which > >causes matching problems. > > > >(bind ?res (run-query* get-id)) > >(?res next) > >(bind ?d (?res getSymbol id)) > > > >You'd think that ?d is a symbol, but it turns out being a String. > > > >I'm using Jess70p1. > > > >Michael > > > > > > > > > > > >-- > >Michael Atighetchi [EMAIL PROTECTED] BBN Technologies > > > >-------------------------------------------------------------------- > >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 owner-jess- > >[EMAIL PROTECTED] > >-------------------------------------------------------------------- > > --------------------------------------------------------- > Ernest Friedman-Hill > Advanced Software Research Phone: (925) 294-2154 > Sandia National Labs FAX: (925) 294-2234 > PO Box 969, MS 9012 [EMAIL PROTECTED] > Livermore, CA 94550 http://www.jessrules.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] > -------------------------------------------------------------------- -- Michael Atighetchi [EMAIL PROTECTED] BBN Technologies -------------------------------------------------------------------- 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] --------------------------------------------------------------------
