Greetings. The following simple function incorrectly fails when handed
strings containing embedded hyphens ('-'):

(deffunction str-intern (?str)
  (printout t "str-intern(): " ?str " (" (stringp ?str) ")" crlf)
  (call ?str intern))

Jess> (batch schtum.clp)
TRUE
Jess> (str-intern "FOO")
str-intern(): FOO (TRUE)
"FOO"
Jess> (str-intern "FOO-BAR")
str-intern(): FOO-BAR (TRUE)
Rete Exception in routine call while executing deffunction str-intern.
  Message: Invalid argument to intern at line 2:  ( str-intern "FOO-BAR" ) .
        at java.lang.Throwable.<init>(Compiled Code)
        at java.lang.Exception.<init>(Compiled Code)
        at jess.ReteException.<init>(Compiled Code)
        at jess.reflect.Call.call(Compiled Code)
        at jess.Funcall.simpleExecute(Compiled Code)
        at jess.Funcall.execute(Compiled Code)
        at jess.Funcall.execute(Compiled Code)
        at jess.Deffunction.call(Compiled Code)
        at jess.Funcall.simpleExecute(Compiled Code)
        at jess.Funcall.execute(Compiled Code)
        at jess.Funcall.execute(Compiled Code)
        at jess.Jesp.parseAndExecuteFuncall(Compiled Code)
        at jess.Jesp.parseSexp(Compiled Code)
        at jess.Jesp.parse(Compiled Code)
        at jess.Main.main(Compiled Code)
Jess>

Regards,

-- 

-------------------------------------------------------------
David E. Young
Fujitsu Network Communications  "I claim not to have controlled
([EMAIL PROTECTED])    events, but confess plainly
                                 that events have controlled me."
                                  -- Abraham Lincoln (1864)
Apology is Policy
---------------------------------------------------------------------
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]
---------------------------------------------------------------------

Reply via email to