flushing the octave terminal form C++ (oct file)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

flushing the octave terminal form C++ (oct file)

fab_o
Hello,

Is there a way to flush the C++  "octave_stdout" stream  during its execution from a (C++) oct file  ?
the 'octave_stdout.flush()' doesn't seem to work on my system
(3.4.0 compiled from source, Ubuntu 10.10)

/begin{code}
int i;
for (i=0;i<100;i++) {
  octave_stdout<<"blabla\n";
  octave_stdout.flush();       // <--should flush the octave terminal ?
}

/end{code}

I get a screen full of "blabla" that requires me to  scroll to the end to continue my script execution.

Does this problem only appear on my system ?
Reply | Threaded
Open this post in threaded view
|

Re: flushing the octave terminal form C++ (oct file)

fab_o
answer : use std::cout and this one can be flushed. !
Reply | Threaded
Open this post in threaded view
|

Re: flushing the octave terminal form C++ (oct file)

andy buckle
On Fri, May 27, 2011 at 9:22 AM, fab_o <[hidden email]> wrote:
> answer : use std::cout and this one can be flushed. !

There may be some problems with this. For example, I think diary files
may not get written to.

--
/* andy buckle */
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave