help-octave
[Top][All Lists]
Advanced

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

Tcl&octave: howto get the error message when octave run in a pipe?


From: Stef Pillaert
Subject: Tcl&octave: howto get the error message when octave run in a pipe?
Date: Thu, 15 Mar 2001 14:08:42 +0100

Hello list,
I run octave from a GUI written in Tcl, using something like:

set octaveID [open "|octave -qf" r+]
puts $octaveID "disp(5*5);"
gets $octaveID result

(with the additional flush'es and fileevent's to be a bit more robust...)

This works fine, but suppose the string I send to octave has 
octave-syntax-errors, how can I trap the octave-error-message?
 I think I can detect that there is a octave-syntax-fault because the "gets"
will return -1 (=didn't read anything), but I don't have acces to the
error-message this way. I tried something like 

gets stderr errmessage

but that doesn't seem to work,...

Thanks,

Stef.



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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