Hi Kathy,
OK, I messed around a bit, and came up with something that works:
(defrule chackBlank
(tRec (code ?X&=(sym-cat " ")))
=>
...
The 'sym-cat' call returns the argument as an atom, doing an end-run
around the parser. As you note, this is only needed when the slot
contains a character that is not a valid atom.
I think Kathy Lee Simunich wrote:
>
> I've tried a couple different ways to match
> on a blank character. The defclass of tRec uses an atom
> to correspond to a char in the Java class. Matching by specifying
> an atom in the rule works, but when trying to match with blank
> it doesn't work.
>
> (defrule checkBlank
> (tRec (code " "))
>
> and
>
> (defrule checkBlank
> (tRec (code "\ "))
>
> and
>
> (defrule checkBlank
> (tRec (code ""))
>
> the asserted fact prints out as:
> (tRec (code ))
>
> However, (tRec (code A)) matches a rule such as: (defrule checkA (tRec
> (code A)).
> I'm thinking of just changing the type in the java class from char to
> string.
> That way, I don't have to worry about this.
>
> KathyLee Simunich
> Argonne National Lab
>
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list. List problems? Notify [EMAIL PROTECTED]
> ---------------------------------------------------------------------
>
>
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9214 [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. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------