I think Florian Fischer wrote:
> 
> Actually, in my program, ?a and ?c come from shadow facts and the 
> variables are bound to variables declared long in the underlying Java 
> object.  They are the arrival time and current time in milliseconds.  
> Anyway, being declared long, I would expect the behaviour of ?a and ?c 
> to be like in the second case.  But they behave like in the first case.

Longs aren't fully supported in Jess 6; things that look like long
literals are converted to RU.FLOAT (a double) or RU.INTEGER (an int)
in various contexts; you can't do math directly on RU.LONGs. The only
thing you can really use them for is passing them to Java functions,
where they'll make it through unchanged. Obviously in the one case,
you're seeing the effect of truncation on conversion to INTEGER.

In contrast, in Jess 7, RU.LONG *is* fully supported. Long literals
are parsed correctly as longs, long arithmetic is done natively, and
on that version, you get the same answer for all four
computations.

There's little reason for anyone to be targetting new applications to
Jess 6 at this point.

---------------------------------------------------------
Ernest Friedman-Hill  
Advanced Software Research          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550         http://herzberg.ca.sandia.gov

--------------------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to