"TAJCHMAN Marc" <marc.tajch...@cea.fr> wrote on 10/28/2009 03:44:08 PM:
> Thanks a lot for all the explanations on my error messages. > > [snip] > Also the equality test between strings seems to be different from 1.7.6 to svn > The little test here behaves differently : > > import x10.io.Console; > > public class test3 { > > public static def main(args : Rail[String]) { > val key = "this is a test"; > Console.OUT.println("key = " + key); > if (key.substring(0,4) == "that") > Console.OUT.println("not ok"); > if (key.substring(0,4) == "this") > Console.OUT.println("ok1"); > } > } Yes, Strings were values in X10 1.7 and had structural equality. They are regular classes in X10 2.0, and thus have reference identity and reference equality semantics. You can use the .equals() method to compare them. 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