I can't seem to find that part in the language specification Version 2.0.3.
What page?

Yes, the correct type is Array[Int].
Array has a property "rank" which is the number of dimensions.
So a more exact type in your example would be:
Array[Int]{rank==2}


On Mon, May 17, 2010 at 3:14 PM, Jeeva Paudel <je...@ualberta.ca> wrote:

> Hi all,
>
> I have a confusion regarding creation and initialization of
> multi-dimensional arrays. The language specification (by Vijay Saraswat)
> suggests the following syntax:
>
>        val data2 : Array[Int,Int] =
> Array.make[Int]([1..1000,1..1000]->here, ((i,j):Point) => i*j);
>
>  With this syntax, the compiler reports the following error:
>       The type of the variable initializer 
> "x10.lang.Array[x10.lang.Int]{_self27781302.dist==arg27780391}"
> does not match that of the declaration "x10.lang.Array". Number of type
> arguments (2) for x10.lang.Array is not the same as number of type
> parameters (1).
>
> When I try the following, things seem to be fine:
>        val data2 : Array[Int] = Array.make[Int]([1..1000,1..1000]->here,
> ((i,j):Point) => i*j);
>
> Is it the correct way of dealing with multi-dimensional arrays?
>
> Thanks,
>  Jeeva P.
>  Dept. of Comp. Sc.
>  U of Alberta
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> X10-users mailing list
> X10-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/x10-users
>
------------------------------------------------------------------------------

_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to