Converting an octave_value to a stream

John W. Eaton jwe at bevo.che.wisc.edu
Sun Dec 30 10:44:32 CST 2007


On 30-Dec-2007, Thomas Weber wrote:

| I'm trying to convert some .oct files from 2.1 to 3.0. The problematic
| lines are
| 
| DEFUN_DLD( pfsopen, args, , helpString)
| {
| ...
|     octave_stream fid = args(0).stream_value();
| 
| 
| According to src/ChangeLog, the stream_value() and related functions
| were removed in 2005. So, how do I get the stream from an octave_value?

What is the type of args(0) expected to be?  I guess it was a stream
(file) object in the past?  That no longer exists, and we use integers
(stored as doubles) for file numbers now.  See the functions in
src/file-io.cc, for example.

jwe


More information about the Help-octave mailing list