Hi,
I realize that this conversion to double is nonoptimal. On the other hand,
adding support for longs to the current implementation of Value would
either add eight bytes to every Value object (intolerable) or force Jess to
do all integer math internally as long arithmetic (also intolerable, with
serious multithreading implications.)
A special subclass of Value to hold longs is a possibility, but would
probably require a lot of rework (use factory methods everywhere instead
of Value constructors.) This isn't a priority, but it is on the list,
anyway. Maybe in 5.1.
-------------
There was some discussion a while back about Jess supporting Java long type.
It doesn't appear that anything ever came of it. Can we expect this to
happen, and if so when?
When I did some tests, it looks like Java longs get turned into floating
point numbers.
For example the -60067621520002 shows up as -6.0067621520002E13.
The rules do fire, but conversion between Jess and Java is not seemless--
is it an int or a long or a float?--especially this is important if the long
represents a date.
A test file and results are shown below (I don't have to include any Java
here--
the result is that same with just Jess code and deftemplate).
----------------------------------------------------------------------
George Rudolph
Senior Software Engineer
Motorola SSG
8201 E McDowell Rd. Scottsdale, AZ, USA 85252
MailStop H2036B
Email: [EMAIL PROTECTED]
Ph: 480-675-2343
Fax: 480-441-3472
-----------------------------------------------------------------------
--
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 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 (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------