I was attempting to create a jagged array in Scilab to be sent to a Java 
instance. At first, I created a Double class array and had no problems:
a = jarray("java.lang.Double",3,1)
a(1) = [1 2 3]
a(2) = [4 5]
a(3) = 6

Next, I attempted to create a primitive double array instead:
b = jarray("double",3,1)
b(1) = [1 2 3]
b(2) = [4 5]
b(3) = 6
I had no problem with the first few lines. The problem occured at b(3) = 6 when 
I attempted to assign a single element value. I got this error:
!--error 999 
%s_i__EObj: An error occurred: Exception when calling Java method : Array 
[[D@dbe4e5 cannot contain object which is an instance of class java.lang.Double
 at org.scilab.modules.external_objects_java.ScilabJavaArray.set(Unknown Source)
 at org.scilab.modules.external_objects_java.ScilabJavaObject.insert(Unknown 
Source)
Array [[D@dbe4e5 cannot contain object which is an instance of class 
java.lang.Double
 at org.scilab.modules.external_objects_java.ScilabJavaArray.set(Unknown Source)
 at org.scilab.modules.external_objects_java.ScilabJavaObject.insert(Unknown 
Source)

It looks like it considers scalar values as Double type and not the primitive 
double. Is there a way to overcome this? Thanks!



                                          
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to