"Student057 USAF AFMC AFRL/ROME" <[email protected]> wrote on
08/10/2009 12:55:05 PM:
> I am currently working with x10 1.7.5, I am attempting to use indexOf to
> determine if a substring is part of a string however my code:
>
> def subscribe(var topicIn: String): String = {
> val localQ: String = this.messageQ;
> if ((localQ.indexOf(topicIn)) >= 0) {
> return localQ;
> }
> else {
> return "";
> }
> }
>
> Keeps returning the error:
>
> /raid2/speek1/x10/samples/Broker.x10:42: Method indexOf(x10.lang.Char)
> in x10.lang.String cannot be called with arguments (x10.lang.String);
> Call invalid; actual parameter of type x10.lang.String cannot be
> assigned to formal parameter type x10.lang.Char.
>
> I've tried compiling using both the java and c++ compilers. I'm just
> curious if I'm improperly using indexOf or if strings aren't completely
> implemented yet in the 1.7.5 release.
>
> Stephen Peek
Hi, Stephen,
Currently, there is only one indexOf() method defined in x10.lang.String,
and that is String.indexOf(Char). Hence the above error message.
This could be an oversight in our String API. Please open a JIRA issue
for this, and we'll discuss it and fix as necessary.
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/)
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
X10-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/x10-users