Hi Rick --

I don't have time tonight to give you a thoroughly tested answer, but in hopes 
of getting some breadcrumbs back to you quickly:

* I think you want to use channel.readline(ref arg: string) to read a whole 
line up to the linefeed into a string

* I think the lack of flushing write() output to the console by default 
(assuming you're also not printing any linefeed characters) is intentional and 
consistent with typical (C-style) buffering of I/O.  I believe you can address 
it either by flushing the channel after the write, or by turning buffering for 
the channel down/off.

-Brad


________________________________
From: Rick Burris [[email protected]]
Sent: Tuesday, November 04, 2014 2:34 PM
To: [email protected]
Subject: Readln

I feel like this is a really dumb question, but I haven't yet been able to 
figure this out. How can I prompt for stdin input and have it read everything 
to the enter key? So far, I can only seem to manage everything up to the first 
whitespace. It seems to be the same on read and readln.

In a related subject, I've noticed that I can use writeln followed by a read 
operation, but if I use write followed by read, it does not print the message 
until after the read. Is that normal?

(Linux Mint 17, Chapel 1.10.0)

Thank you,
-Rick
------------------------------------------------------------------------------
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to