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 moment, maybe someone else has a good
technique to share.
---> The second:
How do I convert a fact-id into a string?
This does NOT work:
(bind ?x (assert (this will be a string)))
(bind ?string (implode$ ?x))
Jess complains about ?x not being a list.
The value of ?x will be the result of the (assert) function, which
according to the manual here:
http://herzberg.ca.sandia.gov/jess/docs/70/functions.html#assert
Excerpt:
17.19. (assert <fact>+)
Arguments:
One or more facts
Returns:
A Fact, or FALSE
-----
Facts look like they might be lists but they aren't. In LISP it *would*
be because *everything* is a list in LISP ;-D
alan
Thank you.
Henrique
--------------------------------------------------------------------
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]
--------------------------------------------------------------------
--------------------------------------------------------------------
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]
--------------------------------------------------------------------