Hi, Joao, No alarm - I simply wanted to understand more about your problem. We have just uncovered (and fixed) a bug in X10 I/O, and I was wondering if this was an instance of the same bug.
Unfortunately, there really isn't a reference beyond the X10 language report. However, the source code for the X10 libraries is available, so you should be able to just find the APIs there. You can browse the sources for the released version 1.7.3 here: http://x10.svn.sf.net/viewvc/x10/tags/SF_RELEASE_1_7_3/x10.runtime.17/src-x10/x10/ . We are working on a tool that would generate Javadoc-like web pages from the APIs, but do not have an ETA for it (we are pretty short-handed at the moment). 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/) Joao Luis <[email protected]> 04/27/2009 11:54 AM To Igor Peshansky/Watson/i...@ibmus cc [email protected] Subject Re: [X10-users] Reading/Writing to file or standard input/output Hello. Thank you for your reply and, please, accept my apologies if my email alarmed you. Actually, I may have presented my situation in a not-so-good way. My main problem was how to read anything at all, since I was not able to find a class for such sole purpose (something like java.util.Scanner) nor embed Java code like in version 1.5. By the way, is there any reference, beside the 'Report on the Experimental Language' I may check? I, honestly, had no idea x10.io.Console.IN had a 'readLine' method. Best regards. João On Mon, Apr 27, 2009 at 4:24 PM, Igor Peshansky <[email protected]> wrote: Joao Luis <[email protected]> wrote on 04/26/2009 08:13:22 AM: > Hello. > > I've been working with X10 for a college class and I'm supposed to implement > a given algorithm. Though, it would be great to be able to read data from a > file, or even stdin, and output them. > > I'm quite able to output data using x10.io.Console, but it seems impossible > to read data from a file or stdin; of course I'm assuming I'm completelly > wrong, but I don't seem to find any evidence on the contrary. > > I'm using X10 version 1.7. Hi, Joao, How exactly are you reading the input? I've just tried the following: public class IOTest { public static def main(Rail[String]) { try { val s = x10.io.Console.IN.readLine(); x10.io.Console.OUT.println(s); } catch (x10.io.IOException) { } } } and it worked perfectly. Another recommended usage (from x10.io.Reader) is try { val input = new File(inputFileName); val output = new File(outputFileName); val i = input.openRead(); val p = output.printer(); for (line in i.lines()) { line = line.chop(); p.println(line); } } catch (IOException) { } What is the problem you're encountering? 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/) -- Joao Eduardo Luis ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ X10-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/x10-users
