Hey Sid,

Actual transcript typed two seconds ago:

  Jess, the Java Expert System Shell
  Copyright (C) 1998 E.J. Friedman Hill and the Sandia Corporation
  Jess Version 4.1b6 8/15/98

  Jess> (<= 0 (sym-cat 1))
  TRUE
  Jess> (implode$ (create$ "aaa" (+ 1 1) "bbb"))
  "\"aaa\" 2 \"bbb\""
  Jess> (+ "3" "5")
  8 

As I recall, you and I talked about this a while back, which led to
these changes. I'll be getting 4.1b6 out hopefully this week. There
are about half-a-dozen nontrivial bug fixes I've done, so I want to
share this new version.

How's that for service? :)

I think [EMAIL PROTECTED] wrote:
> 
> This is really at a more plebeian level than much of the good
> discussion that's gone on here recently, but dealing with it has
> cost me SO much time...
> 
> What I would like is for Jess to treat atoms that happen to be
> the equivalents of integers, as if they were numbers, when necessary.
> That is, Jess shouldn't object that it is not a number, when doing
> something numerical.  So, for example, I would like it not to complain
> about the following:
> 
> Jess> (<= 0 (sym-cat 1))
> Rete Exception in routine Value::numericValue.
>   Message: Not a number: 1 type = 1 at line 2:  ( <= 0 ( sym-cat 1 ) ) .
>       at jess.Value.numericValue(Value.java:123)
>       at jess._lt_or_eq.call(Funcall.java:1204)
>       at jess.Funcall.simpleExecute(Funcall.java:315)
>       at jess.Funcall.execute(Funcall.java:272)
>       at jess.Funcall.execute(Funcall.java:188)
>       at jess.Jesp.parseSexp(Jesp.java:139)
>       at jess.Jesp.parse(Jesp.java:56)
>       at jess.Main.main(Main.java:224)
> 
> 
> Conversely, I'd like it to treat a number as an atom, when appropriate.
> For example, not to complain about the following:
> 
> Jess> (implode$ (create$ "aaa" (+ 1 1) "bbb"))
> Rete Exception in routine Value::stringValue.
>   Message: Not a string: 2 type = 4 at line 1:  ( implode$ ( create$ "aaa" ( + 1 1 ) 
>"bbb" ) ) .
>       at jess.Value.stringValue(Value.java:162)
>       at jess.implodemf.call(MultiFunctions.java:137)
>       at jess.Funcall.simpleExecute(Funcall.java:315)
>       at jess.Funcall.execute(Funcall.java:272)
>       at jess.Funcall.execute(Funcall.java:188)
>       at jess.Jesp.parseSexp(Jesp.java:139)
>       at jess.Jesp.parse(Jesp.java:56)
>       at jess.Main.main(Main.java:224)
> 
> These two examples are derived from a situation I've actually encountered,
> i.e., I have this list with some numbers in it (as well as other stuff),
> and the list has to be imploded at one point, but also the numeric items 
> in the list have to be compared with other numbers, at another point.
> 
> Of course, I can get around this by leaving it as a number and converting
> it to a symbol, with sym-cat, when necessary.  However, I'm working with
> a very complex piece of code, and determining all circumstances when it
> is necessary has not been easy.  In CLIPS, which this system was originally
> written for, the problem did not exist.
> 
> The situation is made a little more difficult because, as far as I can
> tell, there isn't a built-in sym2num function to allow me to go the other
> way.  Doing this as a user function seems like overkill.
> 
> Anyway, I have a number of other such issues, most of which I've been 
> able to get around by writing little deffunctions.  But this one is
> particularly vexing given the code I'm working with.
> 
> Cheers,
> Sidney
> ---------------------------------------------------------------------
> 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: (510) 294-2154
Sandia National Labs                FAX:   (510) 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]
---------------------------------------------------------------------

Reply via email to