It works for me both in Java and in C++. Can you send your test file?
y...@yoavlaptop ~/test $ x10c Hello.x10 y...@yoavlaptop ~/test $ x10 Hello true -25 y...@yoavlaptop ~/test $ x10c++ Hello.x10 y...@yoavlaptop ~/test $ x10 Hello true -25 On Wed, Jun 23, 2010 at 5:39 PM, Han Dong <saviola7...@gmail.com> wrote: > Hi all, > > I have a question regarding the String compareTo function and the "<=" > function in x10. I have this test code: > > var s1:String = "aaaa"; > var s2:String = "zz"; > > Console.OUT.println((s1 <= s2)); > Console.OUT.println(s1.compareTo(s2)); > > which gave me these outputs: > > : false > : 2 > > For the first comparison test utilizing the "<=" function, it states in the > API that it compares if the first string is before the second string in > dictionary order, however the output is 'false' which means "aaaa" is not > before "zz"? > > For the second comparison test utilizing the "compareTo" function, since it > gave an output of positive 2, this means that s1 follows s2. However, in my > past experiences with compareTo functions, it should be giving me a > negative > integer since "aaaa" should be before "zz"? > > I am running this code on my school's intel nehalem blades, it has > x10-2.0.3 > on them. Compiling, i use: > > x10-2.0.3/bin/x10c++ test.x10 > mpiexec -n 1 ./a.out > > > Thanks, > > Han Dong > h...@umbc.edu > University of Maryland '10 > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > X10-users mailing list > X10-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/x10-users > ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users