Hi,
I am trying to set elements of a 2D Int array and am facing some
problems. Can somebody please help?
Code snippet:
const MAX 10000;
const MAXPERROW 100;
val mat : Array[Int]([1..MAX, 1..MAX]->here, ((i, j):Point) => 0);
for (var i:Int = 0; i < MAX; i++) {
var numCols:Int = new Random().nextInt(MAXPERROW);
for (var j:Int = 0; j < numCols; j++) {
var ColIndex:Int = new Random().nextInt(MAX);
mat.set(1, i, colIndex);
}
}
the 'mat.set' line throws an error which says (among other things):
Call Invalid; calling method does not entail the method guard.
Thanks,
Nilesh.
P.S. Is there a way to search the user archives?
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
X10-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/x10-users