Thanks for your reply.

I'm not an expert on C#, but it seems that int is always 4-byte whether on
32 or 64 bit, so that you propably need int64[] for J64.
Yes, that right. Integers like int or Int32 have a size of 32 bit, but that is not the problem here. Already the _j.GetB always returns boxed int32 values. If I try to cast to Int64, I get an corresponding exception at runtime.

On Aug 18, 2014 8:16 PM, <[email protected]> wrote:

I have an issue with the 64-bit JDLLServer in relation to 64 integers. It seems that JDLLServer handles only the lower 32 bits of a 64 bit value. The
 following test demonstrates this issue:

 Test (C#):
 var value = 1000 + ((Int64)1 << 32);
 _j.Do(String.Format("a =: {0}", value));
 Assert.AreEqual(value, _j.GetB("a"));

 Results:
Assert.AreEqual failed. Expected:<4294968296 (System.Int64)>. Actual:<1000
 (System.Int32)>.


There is a similar problem to getting int arrays. The following test fails:

 _j.Do("a =: 10 20 30");

 var a = (int[])_j.GetB("a");
 Assert.AreEqual(10, a[0]);
 Assert.AreEqual(20, a[1]);
 Assert.AreEqual(30, a[2]);

The result of 'a' is not '10 20 30', but '10 0 20'. I guess, '0' stands
 for the higher 32 bits of the whole value '10 0'.

 What can I do to resolve these issues?
I can not switch to the 32 bit J version, because I work with JD, that
 requires a 64 bit J.
My current workaround is avoiding integers and only work with floats, but
 this is not a real solution.

 Any Ideas?

 PS: Sorry for my English :)

---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to