Index: ls-oct-ascii.cc =================================================================== RCS file: /cvs/octave/src/ls-oct-ascii.cc,v retrieving revision 1.1 diff -u -r1.1 ls-oct-ascii.cc --- ls-oct-ascii.cc 2003/11/19 21:22:39 1.1 +++ ls-oct-ascii.cc 2003/11/22 02:00:24 @@ -26,7 +26,6 @@ #include #endif -#include #include #include @@ -71,27 +70,8 @@ // The number of decimal digits to use when writing ascii data. static int Vsave_precision; -#define CELL_ELT_TAG "" - -// Used when converting Inf to something that gnuplot can read. - -#ifndef OCT_RBV -#define OCT_RBV DBL_MAX / 100.0 -#endif - // Functions for reading ascii data. -static void -ascii_save_type (std::ostream& os, const char *type, bool mark_as_global) -{ - if (mark_as_global) - os << "# type: global "; - else - os << "# type: "; - - os << type << "\n"; -} - static Matrix strip_infnan (const Matrix& m) { @@ -123,45 +103,6 @@ return retval; } -static ComplexMatrix -strip_infnan (const ComplexMatrix& m) -{ - int nr = m.rows (); - int nc = m.columns (); - - ComplexMatrix retval (nr, nc); - - int k = 0; - for (int i = 0; i < nr; i++) - { - for (int j = 0; j < nc; j++) - { - Complex c = m (i, j); - if (xisnan (c)) - goto next_row; - else - { - double re = real (c); - double im = imag (c); - - re = xisinf (re) ? (re > 0 ? OCT_RBV : -OCT_RBV) : re; - im = xisinf (im) ? (im > 0 ? OCT_RBV : -OCT_RBV) : im; - - retval (k, j) = Complex (re, im); - } - } - k++; - - next_row: - continue; - } - - if (k > 0) - retval.resize (k, nc); - - return retval; -} - // Skip white space and comments on stream IS. static void @@ -442,6 +383,9 @@ else typ = tag; +#if 0 + +#else if (SUBSTRING_COMPARE_EQ (typ, 0, 6, "scalar")) { double tmp = octave_read_double (is); @@ -632,6 +576,8 @@ } else error ("load: unknown constant type `%s'", tag.c_str ()); + +#endif } else error ("load: failed to extract keyword specifying value type"); @@ -676,189 +622,15 @@ long old_precision = os.precision (); os.precision (precision); - - octave_value val = val_arg; - - if (val.is_range ()) - { - Range r = val.range_value (); - double base = r.base (); - double limit = r.limit (); - double inc = r.inc (); - if (! (NINT (base) == base - && NINT (limit) == limit - && NINT (inc) == inc)) - val = val.matrix_value (); - } - - if (val.is_string ()) - { - ascii_save_type (os, "string array", mark_as_global); - charMatrix chm = val.char_matrix_value (); - int elements = chm.rows (); - os << "# elements: " << elements << "\n"; - for (int i = 0; i < elements; i++) - { - unsigned len = chm.cols (); - os << "# length: " << len << "\n"; - std::string tstr = chm.row_as_string (i, false, true); - const char *tmp = tstr.data (); - if (tstr.length () > len) - panic_impossible (); - os.write (X_CAST (char *, tmp), len); - os << "\n"; - } - } - else if (val.is_range ()) - { - ascii_save_type (os, "range", mark_as_global); - Range tmp = val.range_value (); - os << "# base, limit, increment\n"; - octave_write_double (os, tmp.base ()); - os << " "; - octave_write_double (os, tmp.limit ()); - os << " "; - octave_write_double (os, tmp.inc ()); - os << "\n"; - } - else if (val.is_real_scalar ()) - { - ascii_save_type (os, "scalar", mark_as_global); - - double d = val.double_value (); - - if (strip_nan_and_inf) - { - if (xisnan (d)) - { - error ("only value to plot is NaN"); - success = false; - } - else - { - d = xisinf (d) ? (d > 0 ? OCT_RBV : -OCT_RBV) : d; - octave_write_double (os, d); - os << "\n"; - } - } - else - { - if (! infnan_warned && (xisnan (d) || xisinf (d))) - { - warning ("save: Inf or NaN values may not be reloadable"); - infnan_warned = true; - } - - octave_write_double (os, d); - os << "\n"; - } - } - else if (val.is_real_matrix ()) - { - ascii_save_type (os, "matrix", mark_as_global); - - os << "# rows: " << val.rows () << "\n" - << "# columns: " << val.columns () << "\n"; - - Matrix tmp = val.matrix_value (); - - if (strip_nan_and_inf) - tmp = strip_infnan (tmp); - else if (! infnan_warned && tmp.any_element_is_inf_or_nan ()) - { - warning ("save: Inf or NaN values may not be reloadable"); - infnan_warned = true; - } - - os << tmp; - } - else if (val.is_cell ()) - { - ascii_save_type (os, "cell", mark_as_global); - - os << "# rows: " << val.rows () << "\n" - << "# columns: " << val.columns () << "\n"; - - Cell tmp = val.cell_value (); - - for (int j = 0; j < tmp.cols (); j++) - { - for (int i = 0; i < tmp.rows (); i++) - { - octave_value o_val = tmp.elem (i, j); - - // Recurse to print sub-value. - bool b = save_ascii_data (os, o_val, CELL_ELT_TAG, - infnan_warned, strip_nan_and_inf, - mark_as_global, 0); - - if (! b) - return os; - } - - os << "\n"; - } - } - else if (val.is_complex_scalar ()) - { - ascii_save_type (os, "complex scalar", mark_as_global); - - Complex c = val.complex_value (); - if (strip_nan_and_inf) - { - if (xisnan (c)) - { - error ("only value to plot is NaN"); - success = false; - } - else - { - double re = real (c); - double im = imag (c); - - re = xisinf (re) ? (re > 0 ? OCT_RBV : -OCT_RBV) : re; - im = xisinf (im) ? (im > 0 ? OCT_RBV : -OCT_RBV) : im; - - c = Complex (re, im); - - octave_write_complex (os, c); - os << "\n"; - } - } - else - { - if (! infnan_warned && (xisnan (c) || xisinf (c))) - { - warning ("save: Inf or NaN values may not be reloadable"); - infnan_warned = true; - } - - octave_write_complex (os, c); - os << "\n"; - } - } - else if (val.is_complex_matrix ()) - { - ascii_save_type (os, "complex matrix", mark_as_global); - - os << "# rows: " << val.rows () << "\n" - << "# columns: " << val.columns () << "\n"; - - ComplexMatrix tmp = val.complex_matrix_value (); + if (mark_as_global) + os << "# type: global "; + else + os << "# type: "; - if (strip_nan_and_inf) - tmp = strip_infnan (tmp); - else if (! infnan_warned && tmp.any_element_is_inf_or_nan ()) - { - warning ("save: Inf or NaN values may not be reloadable"); - infnan_warned = true; - } + octave_value val = val_arg; - os << tmp; - } - else - gripe_wrong_type_arg ("save", val, false); + success = val . save_ascii(os, infnan_warned, strip_nan_and_inf); os.precision (old_precision); Index: ls-oct-ascii.h =================================================================== RCS file: /cvs/octave/src/ls-oct-ascii.h,v retrieving revision 1.1 diff -u -r1.1 ls-oct-ascii.h --- ls-oct-ascii.h 2003/11/19 21:22:39 1.1 +++ ls-oct-ascii.h 2003/11/22 02:00:24 @@ -23,6 +23,17 @@ #if !defined (octave_ls_oct_ascii_h) #define octave_ls_oct_ascii_h 1 +#include + +// Flag for cell elements +#define CELL_ELT_TAG "" + +// Used when converting Inf to something that gnuplot can read. + +#ifndef OCT_RBV +#define OCT_RBV DBL_MAX / 100.0 +#endif + extern std::string extract_keyword (std::istream& is, const char *keyword); Index: ov-cell.cc =================================================================== RCS file: /cvs/octave/src/ov-cell.cc,v retrieving revision 1.30 diff -u -r1.30 ov-cell.cc --- ov-cell.cc 2003/11/14 19:49:56 1.30 +++ ov-cell.cc 2003/11/22 02:00:24 @@ -45,6 +45,8 @@ #include "ov-re-mat.h" #include "ov-scalar.h" +#include "ls-oct-ascii.h" + template class octave_base_matrix; DEFINE_OCTAVE_ALLOCATOR (octave_cell); @@ -393,6 +395,42 @@ os << "{" << dv.str () << " Cell Array}"; newline (os); } +} + +#define CELL_ELT_TAG "" + +bool octave_cell::save_ascii (std::ostream& os, bool& infnan_warned, + bool strip_nan_and_inf) +{ + os << "cell\n"; + + os << "# rows: " << rows () << "\n" + << "# columns: " << columns () << "\n"; + + Cell tmp = cell_value (); + + for (int j = 0; j < tmp.cols (); j++) + { + for (int i = 0; i < tmp.rows (); i++) + { + octave_value o_val = tmp.elem (i, j); + + // Recurse to print sub-value. + bool b = save_ascii_data (os, o_val, CELL_ELT_TAG, + infnan_warned, strip_nan_and_inf, 0, 0); + + if (! b) + return os; + } + + os << "\n"; + } + return true; +} + +bool octave_cell::load_ascii (std::istream& is, bool& global) +{ + return false; } DEFUN (iscell, args, , Index: ov-cell.h =================================================================== RCS file: /cvs/octave/src/ov-cell.h,v retrieving revision 1.20 diff -u -r1.20 ov-cell.h --- ov-cell.h 2003/11/14 19:49:56 1.20 +++ ov-cell.h 2003/11/22 02:00:24 @@ -109,6 +109,12 @@ void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const; + + bool save_ascii (std::ostream& os, bool& infnan_warned, + bool strip_nan_and_inf); + + bool load_ascii (std::istream& is, bool& global); + private: DECLARE_OCTAVE_ALLOCATOR Index: ov-complex.cc =================================================================== RCS file: /cvs/octave/src/ov-complex.cc,v retrieving revision 1.22 diff -u -r1.22 ov-complex.cc --- ov-complex.cc 2003/11/14 19:49:56 1.22 +++ ov-complex.cc 2003/11/22 02:00:25 @@ -43,6 +43,8 @@ #include "gripes.h" #include "pr-output.h" +#include "ls-oct-ascii.h" + template class octave_base_scalar; DEFINE_OCTAVE_ALLOCATOR (octave_complex); @@ -144,6 +146,54 @@ octave_complex::complex_array_value (bool force_conversion) const { return ComplexNDArray (dim_vector (1, 1), scalar); +} + +bool octave_complex::save_ascii (std::ostream& os, bool& infnan_warned, + bool strip_nan_and_inf) +{ + os << "complex scalar\n"; + + Complex c = complex_value (); + + if (strip_nan_and_inf) + { + if (xisnan (c)) + { + error ("only value to plot is NaN"); + return false; + } + else + { + double re = real (c); + double im = imag (c); + + re = xisinf (re) ? (re > 0 ? OCT_RBV : -OCT_RBV) : re; + im = xisinf (im) ? (im > 0 ? OCT_RBV : -OCT_RBV) : im; + + c = Complex (re, im); + + octave_write_complex (os, c); + os << "\n"; + } + } + else + { + if (! infnan_warned && (xisnan (c) || xisinf (c))) + { + warning ("save: Inf or NaN values may not be reloadable"); + infnan_warned = true; + } + + octave_write_complex (os, c); + os << "\n"; + } + + return true; +} + +bool octave_complex::load_ascii (std::istream& is, bool& global) +{ + return false; } /* Index: ov-complex.h =================================================================== RCS file: /cvs/octave/src/ov-complex.h,v retrieving revision 1.22 diff -u -r1.22 ov-complex.h --- ov-complex.h 2003/11/14 19:49:56 1.22 +++ ov-complex.h 2003/11/22 02:00:25 @@ -98,6 +98,11 @@ void decrement (void) { scalar -= 1.0; } + bool save_ascii (std::ostream& os, bool& infnan_warned, + bool strip_nan_and_inf); + + bool load_ascii (std::istream& is, bool& global); + private: DECLARE_OCTAVE_ALLOCATOR Index: ov-cx-mat.cc =================================================================== RCS file: /cvs/octave/src/ov-cx-mat.cc,v retrieving revision 1.30 diff -u -r1.30 ov-cx-mat.cc --- ov-cx-mat.cc 2003/11/14 19:49:56 1.30 +++ ov-cx-mat.cc 2003/11/22 02:00:25 @@ -45,6 +45,8 @@ #include "ov-scalar.h" #include "pr-output.h" +#include "ls-oct-ascii.h" + template class octave_base_matrix; DEFINE_OCTAVE_ALLOCATOR (octave_complex_matrix); @@ -170,6 +172,73 @@ octave_complex_matrix::complex_matrix_value (bool) const { return matrix.matrix_value (); +} + +static ComplexMatrix +strip_infnan (const ComplexMatrix& m) +{ + int nr = m.rows (); + int nc = m.columns (); + + ComplexMatrix retval (nr, nc); + + int k = 0; + for (int i = 0; i < nr; i++) + { + for (int j = 0; j < nc; j++) + { + Complex c = m (i, j); + if (xisnan (c)) + goto next_row; + else + { + double re = real (c); + double im = imag (c); + + re = xisinf (re) ? (re > 0 ? OCT_RBV : -OCT_RBV) : re; + im = xisinf (im) ? (im > 0 ? OCT_RBV : -OCT_RBV) : im; + + retval (k, j) = Complex (re, im); + } + } + k++; + + next_row: + continue; + } + + if (k > 0) + retval.resize (k, nc); + + return retval; +} + +bool octave_complex_matrix::save_ascii (std::ostream& os, bool& infnan_warned, + bool strip_nan_and_inf) +{ + os << "complex matrix\n"; + + os << "# rows: " << rows () << "\n" + << "# columns: " << columns () << "\n"; + + ComplexMatrix tmp = complex_matrix_value (); + + if (strip_nan_and_inf) + tmp = strip_infnan (tmp); + else if (! infnan_warned && tmp.any_element_is_inf_or_nan ()) + { + warning ("save: Inf or NaN values may not be reloadable"); + infnan_warned = true; + } + + os << tmp; + + return true; +} + +bool octave_complex_matrix::load_ascii (std::istream& is, bool& global) +{ + return false; } /* Index: ov-cx-mat.h =================================================================== RCS file: /cvs/octave/src/ov-cx-mat.h,v retrieving revision 1.28 diff -u -r1.28 ov-cx-mat.h --- ov-cx-mat.h 2003/10/27 15:41:55 1.28 +++ ov-cx-mat.h 2003/11/22 02:00:25 @@ -108,6 +108,11 @@ void decrement (void) { matrix -= Complex (1.0); } + bool save_ascii (std::ostream& os, bool& infnan_warned, + bool strip_nan_and_inf); + + bool load_ascii (std::istream& is, bool& global); + private: DECLARE_OCTAVE_ALLOCATOR Index: ov-range.cc =================================================================== RCS file: /cvs/octave/src/ov-range.cc,v retrieving revision 1.34 diff -u -r1.34 ov-range.cc --- ov-range.cc 2003/11/14 19:49:56 1.34 +++ ov-range.cc 2003/11/22 02:00:25 @@ -250,6 +250,39 @@ return retval; } +bool octave_range::save_ascii (std::ostream& os, bool& infnan_warned, + bool strip_nan_and_inf) +{ + Range r = range_value (); + double base = r.base (); + double limit = r.limit (); + double inc = r.inc (); + + if (! (NINT (base) == base + && NINT (limit) == limit + && NINT (inc) == inc)) + { + octave_matrix val (matrix_value()); + + return val . save_ascii(os, infnan_warned, strip_nan_and_inf); + } + os << "range\n"; + os << "# base, limit, increment\n"; + octave_write_double (os, base); + os << " "; + octave_write_double (os, limit); + os << " "; + octave_write_double (os, inc); + os << "\n"; + + return true; +} + +bool octave_range::load_ascii (std::istream& is, bool& global) +{ + return false; +} + /* ;;; Local Variables: *** ;;; mode: C++ *** Index: ov-range.h =================================================================== RCS file: /cvs/octave/src/ov-range.h,v retrieving revision 1.35 diff -u -r1.35 ov-range.h --- ov-range.h 2003/11/17 03:48:04 1.35 +++ ov-range.h 2003/11/22 02:00:25 @@ -166,6 +166,11 @@ bool print_name_tag (std::ostream& os, const std::string& name) const; + bool save_ascii (std::ostream& os, bool& infnan_warned, + bool strip_nan_and_inf); + + bool load_ascii (std::istream& is, bool& global); + private: Range range; Index: ov-re-mat.cc =================================================================== RCS file: /cvs/octave/src/ov-re-mat.cc,v retrieving revision 1.36 diff -u -r1.36 ov-re-mat.cc --- ov-re-mat.cc 2003/11/14 19:49:56 1.36 +++ ov-re-mat.cc 2003/11/22 02:00:25 @@ -49,6 +49,8 @@ #include "pr-output.h" #include "variables.h" +#include "ls-oct-ascii.h" + #if ! defined (UCHAR_MAX) #define UCHAR_MAX 255 #endif @@ -202,6 +204,65 @@ } return retval; +} + +static Matrix +strip_infnan (const Matrix& m) +{ + int nr = m.rows (); + int nc = m.columns (); + + Matrix retval (nr, nc); + + int k = 0; + for (int i = 0; i < nr; i++) + { + for (int j = 0; j < nc; j++) + { + double d = m (i, j); + if (xisnan (d)) + goto next_row; + else + retval (k, j) = xisinf (d) ? (d > 0 ? OCT_RBV : -OCT_RBV) : d; + } + k++; + + next_row: + continue; + } + + if (k > 0) + retval.resize (k, nc); + + return retval; +} + +bool octave_matrix::save_ascii (std::ostream& os, bool& infnan_warned, + bool strip_nan_and_inf) +{ + os << "matrix\n"; + + os << "# rows: " << rows () << "\n" + << "# columns: " << columns () << "\n"; + + Matrix tmp = matrix_value (); + + if (strip_nan_and_inf) + tmp = strip_infnan (tmp); + else if (! infnan_warned && tmp.any_element_is_inf_or_nan ()) + { + warning ("save: Inf or NaN values may not be reloadable"); + infnan_warned = true; + } + + os << tmp; + + return true; +} + +bool octave_matrix::load_ascii (std::istream& is, bool& global) +{ + return false; } /* Index: ov-re-mat.h =================================================================== RCS file: /cvs/octave/src/ov-re-mat.h,v retrieving revision 1.33 diff -u -r1.33 ov-re-mat.h --- ov-re-mat.h 2003/10/27 15:41:55 1.33 +++ ov-re-mat.h 2003/11/22 02:00:25 @@ -109,6 +109,11 @@ octave_value convert_to_str_internal (bool pad, bool force) const; + bool save_ascii (std::ostream& os, bool& infnan_warned, + bool strip_nan_and_inf); + + bool load_ascii (std::istream& is, bool& global); + private: DECLARE_OCTAVE_ALLOCATOR Index: ov-scalar.cc =================================================================== RCS file: /cvs/octave/src/ov-scalar.cc,v retrieving revision 1.22 diff -u -r1.22 ov-scalar.cc --- ov-scalar.cc 2003/11/14 19:49:56 1.22 +++ ov-scalar.cc 2003/11/22 02:00:25 @@ -43,6 +43,8 @@ #include "xdiv.h" #include "xpow.h" +#include "ls-oct-ascii.h" + template class octave_base_scalar; DEFINE_OCTAVE_ALLOCATOR (octave_scalar); @@ -100,6 +102,47 @@ } return retval; +} + +bool octave_scalar::save_ascii (std::ostream& os, bool& infnan_warned, + bool strip_nan_and_inf) +{ + os << "scalar\n"; + + double d = double_value (); + + if (strip_nan_and_inf) + { + if (xisnan (d)) + { + error ("only value to plot is NaN"); + return false; + } + else + { + d = xisinf (d) ? (d > 0 ? OCT_RBV : -OCT_RBV) : d; + octave_write_double (os, d); + os << "\n"; + } + } + else + { + if (! infnan_warned && (xisnan (d) || xisinf (d))) + { + warning ("save: Inf or NaN values may not be reloadable"); + infnan_warned = true; + } + + octave_write_double (os, d); + os << "\n"; + } + + return true; +} + +bool octave_scalar::load_ascii (std::istream& is, bool& global) +{ + return false; } /* Index: ov-scalar.h =================================================================== RCS file: /cvs/octave/src/ov-scalar.h,v retrieving revision 1.28 diff -u -r1.28 ov-scalar.h --- ov-scalar.h 2003/11/18 18:18:16 1.28 +++ ov-scalar.h 2003/11/22 02:00:26 @@ -106,6 +106,11 @@ void decrement (void) { --scalar; } + bool save_ascii (std::ostream& os, bool& infnan_warned, + bool strip_nan_and_inf); + + bool load_ascii (std::istream& is, bool& global); + private: DECLARE_OCTAVE_ALLOCATOR Index: ov-str-mat.cc =================================================================== RCS file: /cvs/octave/src/ov-str-mat.cc,v retrieving revision 1.34 diff -u -r1.34 ov-str-mat.cc --- ov-str-mat.cc 2003/11/14 19:49:56 1.34 +++ ov-str-mat.cc 2003/11/22 02:00:26 @@ -190,6 +190,34 @@ current_print_indent_level (), true); } +bool octave_char_matrix_str::save_ascii (std::ostream& os, + bool& infnan_warned, + bool strip_nan_and_inf) +{ + os << "string array\n"; + charMatrix chm = char_matrix_value (); + int elements = chm.rows (); + os << "# elements: " << elements << "\n"; + for (int i = 0; i < elements; i++) + { + unsigned len = chm.cols (); + os << "# length: " << len << "\n"; + std::string tstr = chm.row_as_string (i, false, true); + const char *tmp = tstr.data (); + if (tstr.length () > len) + panic_impossible (); + os.write (X_CAST (char *, tmp), len); + os << "\n"; + } + + return true; +} + +bool octave_char_matrix_str::load_ascii (std::istream& is, bool& global) +{ + return false; +} + /* ;;; Local Variables: *** ;;; mode: C++ *** Index: ov-str-mat.h =================================================================== RCS file: /cvs/octave/src/ov-str-mat.h,v retrieving revision 1.30 diff -u -r1.30 ov-str-mat.h --- ov-str-mat.h 2003/10/30 05:48:17 1.30 +++ ov-str-mat.h 2003/11/22 02:00:26 @@ -114,6 +114,11 @@ void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const; + bool save_ascii (std::ostream& os, bool& infnan_warned, + bool strip_nan_and_inf); + + bool load_ascii (std::istream& is, bool& global); + private: DECLARE_OCTAVE_ALLOCATOR Index: ov-typeinfo.cc =================================================================== RCS file: /cvs/octave/src/ov-typeinfo.cc,v retrieving revision 1.26 diff -u -r1.26 ov-typeinfo.cc --- ov-typeinfo.cc 2003/11/15 12:51:20 1.26 +++ ov-typeinfo.cc 2003/11/22 02:00:26 @@ -380,6 +380,19 @@ return retval; } +octave_value +octave_value_typeinfo::lookup_type (const std::string &nm) +{ + for (int i = 0;i < num_types; i++) + if (nm == types(i)) + { + // FIXME: How do I initialize an octave_value of the right type? + return octave_value(); + } + + return octave_value(); +} + DEFUN (typeinfo, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} typeinfo (@var{expr})\n\ Index: ov-typeinfo.h =================================================================== RCS file: /cvs/octave/src/ov-typeinfo.h,v retrieving revision 1.14 diff -u -r1.14 ov-typeinfo.h --- ov-typeinfo.h 2003/11/14 19:49:56 1.14 +++ ov-typeinfo.h 2003/11/22 02:00:26 @@ -111,6 +111,8 @@ return instance->do_installed_type_names (); } + octave_value lookup_type (const std::string nm); + protected: octave_value_typeinfo (void) Index: ov.cc =================================================================== RCS file: /cvs/octave/src/ov.cc,v retrieving revision 1.97 diff -u -r1.97 ov.cc --- ov.cc 2003/11/11 00:23:35 1.97 +++ ov.cc 2003/11/22 02:00:27 @@ -1503,6 +1503,23 @@ rep->print_info (os, prefix + " "); } +bool octave_value::save_ascii (std::ostream& os, bool& infnan_warned, + bool strip_nan_and_inf) +{ + gripe_wrong_type_arg ("octave_value::save_ascii()", type_name()); + + os << "\n"; + + return false; +} + +bool octave_value::load_ascii (std::istream& is, bool& global) +{ + gripe_wrong_type_arg ("octave_value::load_ascii()", type_name()); + + return false; +} + static void gripe_unary_op (const std::string& on, const std::string& tn) { Index: ov.h =================================================================== RCS file: /cvs/octave/src/ov.h,v retrieving revision 1.90 diff -u -r1.90 ov.h --- ov.h 2003/11/14 19:49:56 1.90 +++ ov.h 2003/11/22 02:00:28 @@ -627,6 +627,12 @@ virtual void print_info (std::ostream& os, const std::string& prefix = std::string ()) const; + bool save_ascii (std::ostream& os, bool& infnan_warned, + bool strip_nan_and_inf); + + bool load_ascii (std::istream& is, bool& global); + + protected: octave_value (const octave_xvalue&) : rep (0) { }