Mercurial > hg > octave-terminal
changeset 3212:bf61c443a366
[project @ 1998-11-05 04:24:45 by jwe]
author | jwe |
---|---|
date | Thu, 05 Nov 1998 04:24:46 +0000 |
parents | 440b2b28e74a |
children | ba1c7cdc6090 |
files | src/ChangeLog src/data.cc src/ov-base.cc src/ov-base.h |
diffstat | 4 files changed, 15 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +Wed Nov 4 17:21:41 1998 John W. Eaton <jwe@bevo.che.wisc.edu> + + * ov-base.cc (octave_base_value::rows, octave_base_value::columns, + octave_base_value::length): Delete. + * ov-base.h (octave_base_value::rows, octave_base_value::columns, + octave_base_value::length): Define here. All return -1 if not + defined in a derived class. + + * data.cc (Fis_matrix): Also return true if the arg is a range. + Tue Nov 3 09:40:24 1998 John W. Eaton <jwe@bevo.che.wisc.edu> * data.cc (Fis_bool): New function.
--- a/src/data.cc +++ b/src/data.cc @@ -836,7 +836,7 @@ { octave_value arg = args(0); - if (arg.is_scalar_type ()) + if (arg.is_scalar_type () || arg.is_range ()) retval = 1.0; else if (arg.is_matrix_type ()) retval = static_cast<double> (arg.rows () >= 1 && arg.columns () >= 1);
--- a/src/ov-base.cc +++ b/src/ov-base.cc @@ -144,30 +144,6 @@ } int -octave_base_value::rows (void) const -{ - int retval = -1; - gripe_wrong_type_arg ("octave_base_value::rows ()", type_name ()); - return retval; -} - -int -octave_base_value::columns (void) const -{ - int retval = -1; - gripe_wrong_type_arg ("octave_base_value::columns ()", type_name ()); - return retval; -} - -int -octave_base_value::length (void) const -{ - int retval = -1; - gripe_wrong_type_arg ("octave_base_value::length ()", type_name ()); - return retval; -} - -int octave_base_value::int_value (bool require_int, bool frc_str_conv) const { int retval = 0;
--- a/src/ov-base.h +++ b/src/ov-base.h @@ -84,10 +84,11 @@ octave_lvalue struct_elt_ref (octave_value *parent, const string& nm); - int rows (void) const; - int columns (void) const; + int rows (void) const { reteurn -1; } - int length (void) const; + int columns (void) const { reteurn -1; } + + int length (void) const { reteurn -1; } bool is_defined (void) const { return false; }