Hello,
I'm currently experimenting with J as a COM (as per
http://www.jsoftware.com/jwiki/Guides/J%20CSharp). But I'm running on a
64-bit machine and using J602a-64bit.
If I attempt this in C#:
int[] intArray = { 1, 2, 3, 4, 5, 6 };
jObject.SetB("IntArray", ref intArray);
then fetch it back:
object retVal;
jObject.GetB("IntArray", out retVal);
The value comes out in C# identical, but in J, "IntArray" will be
8589934593 17179869187 25769803781 96287376 98084592 96159216
The last 3 values are jumble, but watch this:
hfd IntArray
200000001
400000003
600000005
005BD3A90
005D8A6F0
005BB45F0
or
00000002 00000001
00000004 00000003
00000006 00000005
00000000 05BD3A90
00000000 05D8A6F0
00000000 05BB45F0
In other words, I think J is attempting to decode a 64 bit array as 32
bit, but still puts it back in 64 bits, hence the overflow into memory
(the last 3 values).
Scalars work fine. So does J-32bit with either array or scalar.
How can I work around this while still using J-64bit?
Thanks,
Martin Pelletier
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm