octave-maintainers
[Top][All Lists]
Advanced

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

Re: evalc


From: Julien Bect
Subject: Re: evalc
Date: Wed, 27 Mar 2013 15:02:34 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130308 Thunderbird/17.0.4

On 25/03/2013 16:57, Rik wrote:
On 03/24/2013 09:56 AM, address@hidden wrote:
From: Julien Bect <address@hidden>

Rik wrote that :
evalc (should be trivial to capture stdout)
Hello all,

I'm bringing this thread back to life because I just found it while looking
for information about the (apparently unimplemented) function evalc()...

In the quoted message, Rik says that an implementation of evalc() exists
somewhere on Octave-forge, but I don't see it here :

http://octave.sourceforge.net/functions_by_alpha.php?letter=E

Does anybody know where I can find it ?
3/25/13

Julien,

I don't think it exists yet.  My comment (should be trivial to capture
stdout) indicates to me that I saw this as a very straightforward extension
of eval.

Matlab describes evalc as

"T = evalc(S) is the same as eval(S) except that anything that would
normally be written to the command window, except for error messages, is
captured and returned in the character array T (lines in T are separated by
\n characters). "

So I think an m-file could be written that wraps around eval and
temporarily redirects stdout to a file which could then be read into [T].

How would you do that in an m-file ? Using PAGER() ?

How about hacking octave_pager_stream directly (changing its rdbuf) ?




reply via email to

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