« Return to Thread: streamlined output (no

streamlined output (no

by John W. Eaton-3 :: Rate this Message:

Reply to Author | View in Thread

On 25-Jun-2009, ws wrote:

| Is there a way to get streamlined output from Octave when run from
| the command line with "--eval" (or anytime)?
|  
| I want to get rid of superfluous messages etc and just return straight,
| re-parseable octave code, without newlines for display, extra empty lines,
| "ans = " verbiage, etc.  
|
| I am writing a hook in Tcl (yeah, I like Tcl...  don't hate me...),
| and I would like to be able to send text to an octave process text like
|
| [1,0;2,0;3,0] + 4
|
| and get back
|
| [5,4;6,4;7,4]
|
| I don't want to suppress all output, just have it formatted more, um,
| sensibly (at least from a glue-programming perspective).

Octave does not have a format mode like this, but most of the routines
in src/pr-output.cc have a "pr_as_read_syntax" option.  This option
was originally used for a purpose different from the one you have in
mind, but maybe it would not be too hard to implement what you want.
I'd certainly consider a patch.

jwe
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

 « Return to Thread: streamlined output (no