octave-maintainers
[Top][All Lists]
Advanced

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

Re: How to break out of a computation?


From: Sebastien Loisel
Subject: Re: How to break out of a computation?
Date: Sat, 18 Feb 2006 19:31:22 +0100

On 2/18/06, John W. Eaton <address@hidden> wrote:
On 18-Feb-2006, Sebastien Loisel wrote:

| 1) You can see the result of any disp() as soon as it's done (instead of
| batched together at the end of the computation)

Isn't that just a matter of setting page_output_immediately = 1?

Sorry, I wasn't clear enough. It's not an Octave thing, it's a GUI thing. You see, I grab all of Octave's outputs and buffer them, then eventually display them in my GUI window. Because the way it was written thus far, my GUI (not Octave) was *not* displaying any of Octave's intermediate result *until* the eval_string() call returned. This bug wasn't Octave's fault, it was my fault.

then return to it?  Sending Octave a SIGINT should do the former.

Ok, that seems to work.

> Also, if you are finding that you need to modify the Octave internals

I'm avoiding that as much as I can. There is a one-line patch I had the regret of sending David Bateman. To get the GUI to work under MinGW, the line

std::ostream &get_cerr(void) { return cerr; }

must be added in error.cc. In Linux, no such patch is needed. This is in fact a problem with the semantics of DLL in Windows. That is the only modification to core octave so far and I really think it'll stay that way.

The few things that might come back to bite me are:

1)
address@hidden octave-2.1.72]$ grep -l cout */*.cc
liboctave/Array-util.cc
scripts/gethelp.cc
src/file-io.cc
src/octave.cc
src/oct-stream.cc
src/pager.cc
src/parse.cc
src/pt-plot.cc
src/toplev.cc

Shouldn't they be using octave_stdout? Also, any printf to stdout or stderr will be a problem.

2) The Copyright message it prints when it starts up (GNU Octave, version 2.1.57 (i686-pc-linux-gnu), etc...), how's that ending up on the console? I'm having a hard time capturing it.

Cheers,

Sébastien Loisel


reply via email to

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