Try Y->set(get_val(), 1)

On Thu, Dec 2, 2010 at 1:55 PM, Kirak Hong <hok...@gatech.edu> wrote:

> Hi,
> *
> *Does anyone know how to access X10 Array in the native code block?
> I am trying to copy a whole matrix (array with rank 2) from C++ to X10, but
> I couldn't even access one element of X10 array in the native code block.
>
> For example, I could access an Int variable in the native code block :
>
> var Y : Int = 1;
> { @Native("c++","Y = get_val(); }") {} }
>
> However, I coulnd't access an element of Array inside the native code block
> since the compiler complains.
>
> var Y : Array[Int] = new Array[Int](1..10, 0);
> { @Native("c++","Y(1) = get_val(); }") {} }
>
> Thanks,
> Kirak
> **
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> X10-users mailing list
> X10-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/x10-users
>
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to