Thank you, that worked!
The case in which I am using this is actually more complex than the
small example I have shown.
I am integrating Jess with the JADE framework. JADE includes an example
of how to use Jess, which comes with some code for managing the template
of an ACL message (agent
I think Henrique Lopes Cardoso wrote:
(defrule r1
?x - (foo)
=
(bind ?string (implode$ ?x)) ;; IS THERE A WAY OF DOING THIS?
?x is a jess.Fact object. You can call any of the methods of jess.Fact
on it -- including toString() and toStringWithParens(), one of which
Hi,
I have two problems.
--- The first:
I have a string which contains an atom. How do I convert it to an atom?
I tried this,which works:
(bind ?string henrique)
(nth$ 1 (explode$ ?string))
Is there a simpler way?
--- The second:
How do I convert a fact-id into a string?
This
Henrique Lopes Cardoso wrote:
Hi,
I have two problems.
--- The first:
I have a string which contains an atom. How do I convert it to an atom?
I tried this,which works:
(bind ?string henrique)
(nth$ 1 (explode$ ?string))
Is there a simpler way?
I can't think of any at the
Problem here is that assert does not make a list, it makes a fact
with a list:
(assert (this will be a string))
this makes ordered template with name this and multislot which is a list
(will be a string)
to make a list in Jess use create$
(bind ?x (create$ this will be a string))
make ?x