Greetings! Indeed an important question! 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). 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 this addition in CVS (IO.newline() or "\n" by itself will cause a flush on chout), and this should be in the next release. I hope this helps - thanks! Best, Ge! On Wed, 21 Oct 2009, Kassen wrote:
Hey Rob,
But the bottom line: if you've been happy with the way printing to stdout and stderr works your OS works, you'll be fine with ChucK.
Well, I'm distinctly non-happy with ChucK here for the reasons in my last post. Three messages the first time i run it, then four with this offset seems like a bug to me.
Yours, kas.