Hi, Ge!<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
In short, chout prints to stdout (buffered output, higher performance), and cherr prints to stderr (more timely and synchronous, handled differently by console/pipes/redirect). The existing <<< >>> operators prints to stderr by default (there was actually no way to print to stdout before chout).<br>
<br></blockquote><div><br>Check, that's quite clear then.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
If one desires truly synchronous output, then cherr is probably the way to go. At the same time, there are a few nuances of cout (C++) - there is a method to force flushing the buffer - this actually exists for chout - just invoke .flush(). Inserting an "endl" into C++ cout effectively flushes the output stream - this is currently not implemented. I've made<br>
this addition in CVS (IO.newline() or "\n" by itself will cause a flush on chout), and this should be in the next release.<br>
<br></blockquote><div>Well.... now I have a new issue;<br><br>chout.flush();<br><br>...will crash the Mini for me. It even crashes when that's the only line in the file.<br> </div></div>I'm also sorry to have to say that I'm still not sold on the idea that chout works properly. I can accept it being slow but here it is being slow in a very predictable way that's related to what ChucK does. Especially as IO.newline() doesn't seem to -by itself- flush all data out. If you look at my example code you'll see all print commands use newline() yet at the end of running the file there is still a print command up in limbo.<br>
<br>Sorry to persist like this.<br><br>Yours,<br>Kas.<br>