help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Input redirection (was: Re: pb with oct file, return a matrix)


From: Søren Hauberg
Subject: Re: Input redirection (was: Re: pb with oct file, return a matrix)
Date: Wed, 08 Jul 2009 21:41:03 +0200

ons, 08 07 2009 kl. 14:53 -0400, skrev John W. Eaton:
> On 23-Apr-2009, Søren Hauberg wrote:
> 
> | tor, 23 04 2009 kl. 10:48 +0200, skrev Jaroslav Hajek:
> | > you should use octave_stdout (pager.h) if you want your output to mix
> | > with output of other functions normally. That includes going through
> | > the pager if it is enabled. Writing directly to C's stdout bypasses
> | > Octave's I/O mechanisms.
> | 
> | I always wondered why this is the case. Could we just do something like
> | 
> |   std::cout.rdbuf (octave_stdout.rdbuf ()); // untested
> | 
> | to send everything from stdout through the pager?
> 
> That does appear to work for cout, but it doesn't capture stdout.

There's a difference between 'std::cout' and 'stdout'? Now that's just
silly! I guess you could reopen 'stdout', send its output to a file and
then read that file, but seems like overkill to me :-(

Søren (who sometimes really dislike computers) 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]