Sean Soria <sean.so...@gmail.com> wrote on 10/23/2009 05:34:37 PM: > I'm having problems with arrays of arrays. I can't even get the example > ArrayArrayInitializerShorthand.x10 to compile. This code: > public boolean run() { > final dist d = [1:10,1:10]->here; > final int[.] a = new int[d]; > final int[.][.] ia = new int[.][d] (point [i,j]){ return a; > }; > for (point [i,j]: ia) chk(ia[i,j] == a); > return true; > } > > gives this error: > ****Error: SumProduct.x10:38:46:38:46:0:0:11: "Expression" is invalid > ****Error: SumProduct.x10:38:50:38:50:0:0:3: "?" expected after this token > ****Error: SumProduct.x10:38:38:38:64:0:0:9: ": ConditionalExpression" > inserted to complete scope > ****Error: SumProduct.x10:38:17:38:64:0:0:9: ";" inserted to complete scope > SumProduct.x10:1: Unable to parse SumProduct.x10. > > This is X10 1.5, btw. I know it's old, but I would still expect it to > compile examples distributed with it.
Hi, Sean, Arrays of arrays don't work (don't even parse) in X10 1.5. This is a known limitation. If you wish to create arrays of arrays, wrap the inner array into a class. Since X10 1.5 has been unsupported for more than a year, this is not likely to get fixed. The "examples" directory contains both code examples and the test suite, which has code that may or may not compile. Files that do not compile are marked as a limitation (see the top of the source). Arrays of arrays do work with both X10 1.7 and X10 2.0. Igor -- Igor Peshansky (note the spelling change!) IBM T.J. Watson Research Center XJ: No More Pain for XML's Gain (http://www.research.ibm.com/xj/) X10: Parallel Productivity and Performance (http://x10.sf.net/) ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users